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

Troubleshooting Guide: Error 8921 in Microsoft SQL Server 2025

Why This Error Happens

Error 8921 occurs when DBCC CHECKDB (or related consistency check commands) cannot complete because it runs out of workspace in tempdb while collecting internal facts about the database, or because the process encounters an inconsistency in a system table that prevents it from building an accurate snapshot. This is common on large databases where tempdb is undersized, has restrictive autogrowth settings, or resides on a volume with insufficient free disk space. It can also surface if a prior crash, improper shutdown, or corruption event left system catalog tables in a conflicting state.

Step-by-Step Resolution Guide

Step 1: Verify and Expand tempdb Capacity

  • Open SQL Server Management Studio (SSMS) and run EXEC sp_helpfile on tempdb to check current file sizes and growth settings.
  • Confirm the drive hosting tempdb (commonly C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA) has adequate free space — at least 2-3x the size of the database being checked.
  • Manually expand tempdb files using:
  ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, SIZE = 10240MB);
  • Set autogrowth to a fixed MB value (not percentage) to avoid unpredictable growth stalls.

Step 2: Relocate or Add tempdb Data Files

  • If the current volume cannot be expanded, add additional tempdb data files on a separate disk with more free space:
  ALTER DATABASE tempdb ADD FILE (NAME = tempdev2, FILENAME = 'D:\SQLTempDB\tempdev2.ndf', SIZE = 5120MB);
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER for changes to take effect cleanly.
  • Confirm Windows Server 2025 disk permissions grant the SQL Server service account full control over the new tempdb directory.

Step 3: Isolate and Repair System Table Inconsistencies

  • Run DBCC CHECKDB (YourDatabaseName) WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY to capture the full error context preceding Error 8921.
  • Review the SQL Server Error Log (Management > SQL Server Logs in SSMS) for accompanying errors like 605, 823, or 824, which often point to the root corruption.
  • If a specific system table is flagged, take the database offline to single-user mode and run:
  ALTER DATABASE YourDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  DBCC CHECKDB (YourDatabaseName, REPAIR_ALLOW_DATA_LOSS);
  ALTER DATABASE YourDatabaseName SET MULTI_USER;
  • Only use REPAIR_ALLOW_DATA_LOSS after confirming a recent valid backup exists, as this operation can delete corrupted rows.

Step 4: Rule Out Resource Governor or Memory Pressure

  • Check if Resource Governor is throttling tempdb-related workloads via SELECT * FROM sys.dm_resource_governor_resource_pools.
  • Review Windows Performance Monitor (PerfMon) counters for SQLServer:Memory Manager\Memory Grants Pending to rule out memory starvation during the check.
  • Increase max server memory setting if the SQL Server instance is competing with other Windows Server 2025 workloads for RAM.

Alternative or Verification Steps

  • Re-run DBCC CHECKDB immediately after resolving tempdb space to confirm the check completes without Error 8921 and returns a clean consistency report.
  • If the error persists, restore the database from the last known good backup to a test instance and run the check there to confirm whether the corruption is isolated to the production environment or the backup itself.