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

Troubleshooting Guide: SQL Server Error 8962 – “Table Error: Object ID %d”

Why This Error Happens

Error 8962 occurs when SQL Server’s consistency checker (DBCC CHECKDB/CHECKTABLE) detects that a table’s internal page structure or linkage metadata is corrupted, typically caused by underlying storage-level I/O failures, abrupt shutdowns, or faulty hardware writing incomplete pages to disk. This can also stem from bit-level corruption introduced by antivirus software locking database files, or from a failing disk subsystem on Windows Server 2025 that silently drops writes. In rarer cases, it results from a bug in third-party backup tools that interact directly with the MDF/LDF files while SQL Server is still holding locks on them.

Step-by-Step Resolution Guide

Step 1: Confirm the Scope of Corruption

  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOREPAIR, ALL_ERRORMSGS, DATA_PURITY; in SQL Server Management Studio (SSMS) connected to your instance.
  • Note the exact Object ID referenced in the error and cross-reference it using SELECT OBJECT_NAME(object_id) FROM sys.objects WHERE object_id = <ObjectID>;
  • Check the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for correlating I/O warnings.

Step 2: Isolate and Rule Out Hardware/Storage Issues

  • Open Windows Server 2025 Event Viewer (eventvwr.msc) and inspect the System log under Windows Logs for Disk or NTFS warnings around the same timestamp.
  • Run chkdsk C: /f /r (adjust drive letter to where your .mdf/.ldf files reside) during a maintenance window, as this requires a reboot.
  • Verify that antivirus/Windows Defender exclusions are set for SQL Server data directories: Add-MpPreference -ExclusionPath "C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA"

Step 3: Restore from a Clean Backup (Preferred Fix)

  • Identify the last known good full backup prior to corruption using RESTORE HEADERONLY FROM DISK = 'D:\Backups\YourDB.bak';
  • Restore to a new database name first to validate integrity: RESTORE DATABASE YourDB_Test FROM DISK = 'D:\Backups\YourDB.bak' WITH MOVE 'YourDB' TO 'D:\Data\YourDB_Test.mdf', MOVE 'YourDB_log' TO 'D:\Data\YourDB_Test.ldf';
  • Run DBCC CHECKDB('YourDB_Test') against the restored copy to confirm it is clean before promoting it to production.

Step 4: Repair as a Last Resort (Data Loss Risk)

  • If no clean backup exists, set the database to single-user mode: ALTER DATABASE YourDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  • Run DBCC CHECKDB('YourDB', REPAIR_ALLOW_DATA_LOSS); — understand this may delete corrupted rows/pages to restore structural consistency.
  • Set the database back to multi-user mode afterward: ALTER DATABASE YourDB SET MULTI_USER;

Alternative or Verification Steps

  • After applying a fix, re-run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOREPAIR; and confirm it returns 0 allocation errors and 0 consistency errors.
  • If corruption recurs on the same table shortly after repair, treat it as a hardware-level symptom and run full SMART diagnostics on the physical disk or validate the SAN/RAID controller firmware on the Windows Server 2025 host.