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

Troubleshooting Guide: SQL Server Error 8968 – Table Error on Page Structure

Why This Error Happens

Error 8968 occurs when SQL Server’s DBCC CHECKDB process encounters a page whose internal structure does not match the expected allocation metadata, typically due to physical database corruption. This can be caused by underlying disk I/O failures, faulty storage controllers, improper shutdowns, or corruption introduced by antivirus/backup software locking data files mid-write. In Windows Server 2025 environments, this is also sometimes triggered by misconfigured Storage Spaces Direct (S2D) volumes or interrupted VHDX operations on virtualized SQL instances.

Step-by-Step Resolution Guide

Step 1: Verify the Scope of Corruption

  • Run DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS to get a full list of affected objects.
  • Note the Object ID and Page ID referenced in the error (%d and %S_PGID) to identify if it is a user table or system table.
  • Check the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for correlating I/O warnings (Event ID 823 or 824).

Step 2: Check Hardware and Storage Health

  • Open Event Viewer on Windows Server 2025 and navigate to Windows Logs > System to check for Disk or NTFS errors.
  • Run chkdsk C: /f /r (replace C: with your data drive) during a maintenance window to repair file system-level errors.
  • If using Storage Spaces Direct, run Get-VirtualDisk in PowerShell to confirm the health status is “Healthy” and not “Degraded.”

Step 3: Restore from a Clean Backup

  • Identify the last known good full backup prior to the corruption timestamp.
  • Use RESTORE DATABASE YourDatabaseName FROM DISK = 'path_to_backup.bak' WITH REPLACE to overwrite the corrupted database.
  • Apply transaction log backups sequentially to minimize data loss up to the point of failure.

Step 4: Execute Repair as a Last Resort

  • If no clean backup exists, take the database into single-user mode: ALTER DATABASE YourDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE.
  • Run DBCC CHECKDB ('YourDatabaseName', REPAIR_ALLOW_DATA_LOSS).
  • Switch back to multi-user mode once completed: ALTER DATABASE YourDatabaseName SET MULTI_USER.

Alternative or Verification Steps

  • Verify the Fix: Re-run DBCC CHECKDB on the database; a clean result with “0 allocation errors and 0 consistency errors” confirms the repair was successful.
  • Alternative Solution: If corruption persists across multiple restores, migrate the data to a new database using Generate Scripts or the Import/Export Wizard to bypass the physically corrupted file structure entirely, then decommission the old database file.