Skip to content
Microsoft SQL Server

SQL Server Error 8921

Check terminated: a failure was detected while collecting facts

Applies to: All supported SQL Server versions (2016 to 2025), Azure SQL Managed Instance
Last technically reviewed 24 October 2026 on SQL Server 2025 (17.0.1145.4)
The full message
Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.
Other forms of this message
Message 5235 in the error log when a check stops early (wording from sys.messages; values in angle brackets vary)
DBCC CHECKDB (AppDb) executed by <login> terminated abnormally due to error state <n>. Elapsed time: <h> hours <m> minutes <s> seconds.
Error number
8921
Severity
16 (user-correctable error)
State
Not documented by Microsoft (not reproduced here)
Product
Microsoft SQL Server Database Engine
Versions
All supported SQL Server versions (2016 to 2025), Azure SQL Managed Instance
Last reviewed
24 October 2026

What it means

Error 8921 means DBCC CHECKDB (or CHECKTABLE, CHECKFILEGROUP) gave up before checking anything, because it could not collect the information it needs, most often for lack of tempdb space or because of damaged system tables.

DBCC consistency checks work in two stages: first they read the database and store "facts" about every page and row in a worktable in tempdb, then they compare those facts. 8921 is raised in the first stage, so the check did not finish and tells you nothing yet about the user data. The message itself gives the two usual reasons, and "Check previous errors" is the key instruction: the error printed just before 8921 is the real cause.

If the earlier error is about space in tempdb (for example error 1105 naming tempdb), the check simply needs more tempdb than was available, which is common for very large databases or when other workloads fill tempdb at the same time. If the earlier errors are about system tables or metadata, the database itself may be damaged and should be treated like other consistency errors. The catalogue severity is 16; Microsoft does not document the state.

Common causes

  • tempdb ran out of space during the check: its files hit their maximum size or the drive is full.
  • Other workloads (sorts, hash joins, version store, temporary tables) were using most of tempdb while CHECKDB ran.
  • The database is very large and the check was run without estimating the tempdb space it needs.
  • A system table (metadata) is inconsistent, so the check cannot build its picture of the database; earlier errors then name system objects.
  • Storage problems that make pages unreadable during the fact-collection stage (look for 823 or 824 errors before 8921).

Diagnose it

Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.

How much tempdb does the check need?

ESTIMATEONLY does not check anything; it only reports the tempdb space CHECKDB is expected to need.

DBCC CHECKDB (N'AppDb') WITH ESTIMATEONLY;
What to look for

A line "Estimated TEMPDB space (in KB) needed for CHECKDB on database ... = N". Compare N with the free space in the next two checks.

How much of tempdb is free, and who is using it?

SELECT SUM(unallocated_extent_page_count) / 128 AS free_mb,
       SUM(version_store_reserved_page_count) / 128 AS version_store_mb,
       SUM(internal_object_reserved_page_count) / 128 AS internal_objects_mb,
       SUM(user_object_reserved_page_count) / 128 AS user_objects_mb
FROM tempdb.sys.dm_db_file_space_usage;
What to look for

Free space well below the estimate means the check cannot fit. A large version store or internal object usage points to other workloads competing for tempdb.

Can tempdb grow, and is there room on the drive?

SELECT f.name, f.type_desc, f.size / 128 AS size_mb,
       CASE f.max_size WHEN -1 THEN NULL ELSE f.max_size / 128 END AS max_size_mb,
       f.growth, f.is_percent_growth,
       vs.available_bytes / 1048576 AS drive_free_mb
FROM tempdb.sys.database_files AS f
CROSS APPLY sys.dm_os_volume_stats(2, f.file_id) AS vs;
What to look for

Data files already at max_size_mb, a growth of 0, or little drive_free_mb explain a tempdb that could not grow during the check.

Read what was logged before and with 8921

EXEC sp_readerrorlog 0, 1, N'DBCC CHECKDB';
EXEC sp_readerrorlog 0, 1, N'tempdb';
What to look for

The CHECKDB start and end lines, and any tempdb space errors at the same time. The errors printed just before 8921 in the DBCC output are the most important evidence.

How to fix it

Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.

Read the earlier errors and decide which case you have

Read-only

Run the check again from a query window and keep the full output. Space errors for tempdb mean the next two fixes apply. Errors about system tables or metadata mean the database may be damaged: confirm with DBCC CHECKCATALOG (N'AppDb') WITH NO_INFOMSGS;, which only reads and checks the system tables.

DBCC CHECKDB (N'AppDb') WITH NO_INFOMSGS, ALL_ERRORMSGS;

Give the check enough tempdb space

Changes configuration

Run the check when tempdb is quiet, and size tempdb (or allow it to grow on a drive with room) for at least the ESTIMATEONLY figure plus normal workload. Pre-sizing equal-sized files is better than relying on autogrowth during the check.

Caution: Changing tempdb file sizes affects the whole instance. Make sure the drive has the space, keep all tempdb data files the same size, and plan the change: shrinking tempdb later is disruptive.

ALTER DATABASE tempdb
MODIFY FILE (NAME = N'tempdev', SIZE = 20480MB, FILEGROWTH = 1024MB);

Split or move the check so it needs less tempdb

Read-only

Check one table or filegroup at a time over several nights, or run a full CHECKDB on a restored copy of the database on another server, which also keeps the load off production. PHYSICAL_ONLY needs less tempdb but skips the logical checks, so still run a full check regularly somewhere.

DBCC CHECKTABLE (N'dbo.Orders') WITH NO_INFOMSGS, ALL_ERRORMSGS;

-- Lighter check (physical structure only)
DBCC CHECKDB (N'AppDb') WITH PHYSICAL_ONLY, NO_INFOMSGS;

If system tables are damaged: restore from a clean backup

Changes database state

Metadata damage cannot be repaired reliably. Restore the most recent clean backup (with log backups to avoid losing work), ideally onto healthy storage, then run a full DBCC CHECKDB on the result.

Caution: A restore over the existing database replaces it. Back up the tail of the log first, restore under a new name if you need to compare, and never use repair with data loss as the first answer.

RESTORE DATABASE AppDb_Check
FROM DISK = N'D:\Backups\AppDb_full.bak'
WITH MOVE N'AppDb'     TO N'D:\SQLData\AppDb_Check.mdf',
     MOVE N'AppDb_log' TO N'D:\SQLLogs\AppDb_Check_log.ldf',
     CHECKSUM;

Examples

CHECKDB on a large database while tempdb is nearly full

Shown as documented, not reproduced here. Earlier errors in the same output (for example a tempdb space error) give the actual cause. The state is not documented by Microsoft, so no header is shown.

DBCC CHECKDB (N'AppDb') WITH NO_INFOMSGS, ALL_ERRORMSGS;
Result
Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.

How to prevent it

Size tempdb for your largest consistency check: run DBCC CHECKDB ... WITH ESTIMATEONLY for the biggest databases now and then, and alert on tempdb free space. Schedule checks away from heavy batch work, or offload them to a server where backups are restored and checked.

Treat a CHECKDB that ended with 8921 as "no result", not as "no errors": make your maintenance job fail visibly so that a missing check is noticed and rerun.

Common questions

Does error 8921 mean my database is corrupt?

Not by itself. Most often the check ran out of tempdb space. Only if the earlier errors point to system tables, or a later complete check reports errors, is the database damaged.

Will WITH TABLOCK help?

TABLOCK makes CHECKDB use locks instead of an internal database snapshot. It addresses snapshot problems, not tempdb space, and it blocks other work, so it is not a general fix for 8921.

Is PHYSICAL_ONLY enough?

It is a useful lighter check that finds most storage damage, but it skips the logical checks. Run a full check regularly, for example on a restored copy.

Learn more on CodeWithSQL

Official documentation

Last technically reviewed 24 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.

Still stuck on a SQL Server error?

Browse the full SQL Server error library, or get hands-on help from an experienced SQL professional.