Why This Error Happens
Error 13028 occurs when the SQL Server Database Engine attempts to locate an index entry in the system catalog (sys.indexes or sys.partitions) but finds that the metadata pointer is missing or inconsistent with the physical page allocation. This is typically caused by an interrupted index rebuild operation, an unexpected service crash during an ALTER INDEX or CREATE INDEX transaction, or underlying disk-level corruption on the volume hosting the .mdf/.ndf files. In some cases, third-party antivirus or backup agents locking database files mid-transaction on Windows Server 2025 can also trigger this catalog mismatch.
Step-by-Step Resolution Guide
Step 1: Isolate the Affected Database and Run Integrity Checks
- Open SQL Server Management Studio (SSMS) and connect to the instance.
- Run
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;to confirm the scope of catalog/index corruption. - Note the specific Object ID and Index ID reported alongside Error 13028 in the output.
Step 2: Rebuild or Drop the Corrupted Index
- If a single index is flagged, attempt a targeted fix first:
ALTER INDEX [IndexName] ON [Schema].[TableName] REBUILD WITH (ONLINE = OFF); - If the rebuild itself fails with 13028, drop and recreate the index manually using the original definition from your schema scripts.
- Avoid
ONLINE = ONrebuilds until the catalog consistency is confirmed, as online operations rely on the same metadata pointers.
Step 3: Check Storage and File System Health
- On Windows Server 2025 / Windows 11, open Event Viewer → Windows Logs → System, and filter for Disk or NTFS warnings correlating with the SQL Server error timestamp.
- Run
chkdsk D:\ /f /r(replaceD:\with the actual data drive) during a maintenance window to rule out physical sector errors. - Confirm no backup or antivirus software is scanning/locking the
*.mdf,*.ndf, or*.ldffiles inC:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\.
Step 4: Restore From a Clean Backup If Corruption Persists
- If
DBCC CHECKDBreports allocation errors that cannot be repaired via index rebuild, use:
DBCC CHECKDB ('YourDatabaseName', REPAIR_REBUILD); - If repair fails, restore the database from the last known good full backup plus transaction log backups using SSMS → Restore Database or
RESTORE DATABASE ... WITH RECOVERY.
Alternative or Verification Steps
- After applying the fix, re-run
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS;and confirm zero allocation or consistency errors are returned. - As a fallback, export the table data via
SELECT INTOa new table, drop and recreate the original table/indexes from scratch, then re-import the data to eliminate any residual catalog corruption.