How to fix Error 1967 on Windows Server 2025 / Windows 11

Why This Error Happens

Error 1967 occurs because SQL Server 2025 does not support creating the first clustered index on a view using the ONLINE = ON option. The online indexing operation requires an existing clustered index to serve as a baseline for maintaining data consistency during the build process, and a view has no underlying physical storage until this initial index is created. Additionally, this restriction is reinforced by Edition-level feature gating, since online index operations are only available in Enterprise and Developer editions.

Step-by-Step Resolution Guide

Step 1: Remove the ONLINE Option From the Initial Index Creation

  • Locate the CREATE UNIQUE CLUSTERED INDEX statement in your script or SSMS query window.
  • Remove or set ONLINE = OFF in the WITH clause for the first clustered index build.
  • Example corrected syntax:
  CREATE UNIQUE CLUSTERED INDEX IX_MyView_Clustered
  ON dbo.MyIndexedView (ColumnA)
  WITH (ONLINE = OFF);

Step 2: Verify Schema Binding and View Compliance

  • Confirm the view was created WITH SCHEMABINDING.
  • Check that all referenced columns are deterministic and that two-part naming (schema.table) is used for base tables.
  • Run the following to inspect view metadata:
  SELECT OBJECTPROPERTYEX(OBJECT_ID('dbo.MyIndexedView'), 'IsSchemaBound');

Step 3: Confirm SQL Server Edition Supports Online Indexing

  • Open SSMS and run:
  SELECT SERVERPROPERTY('Edition');
  • If the result returns Standard or Web Edition, online index operations (even for subsequent indexes) are unsupported; you must use offline rebuilds instead.
  • On Windows Server 2025, validate licensing via Server Manager > Local Server > Properties to ensure Enterprise/Developer Edition is installed if online indexing is a hard requirement.

Step 4: Create Subsequent Indexes Online (Optional)

  • Once the first clustered index exists offline, any additional nonclustered indexes on the view can now safely use ONLINE = ON.
  • Example:
  CREATE NONCLUSTERED INDEX IX_MyView_NonClustered
  ON dbo.MyIndexedView (ColumnB)
  WITH (ONLINE = ON);

Alternative or Verification Steps

  • Verify the fix by querying sys.indexes to confirm the clustered index now exists:
  SELECT name, type_desc FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.MyIndexedView');
  • If online operations remain a strict requirement, consider using Resumable Online Index Rebuilds for subsequent maintenance only after the initial clustered index has been successfully created offline.