DBCC CHECKCATALOG (Transact-SQL)
Checks for catalog consistency within the specified database. The database must be online.
After the DBCC CATALOG command finishes, a message is written to the SQL Server error log. If the DBCC command successfully executes, the message indicates a successful completion and the amount of time that the command ran. If the DBCC command stops before completing the check because of an error, the message indicates the command was terminated, a state value, and the amount of time the command ran. The following table lists and describes the state values that can be included in the message.
Error number 8930 was raised. This indicates a metadata corruption that caused the DBCC command to terminate.
Error number 8967 was raised. There was an internal DBCC error.
A failure occurred during emergency mode database repair.
This indicates a metadata corruption that caused the DBCC command to terminate.
An assert or access violation was detected.
An unknown error occurred that terminated the DBCC command.
DBCC CHECKCATALOG performs various consistency checks between system metadata tables. DBCC CHECKCATALOG uses an internal database snapshot to provide the transactional consistency that it needs to perform these checks. For more information, see Understanding Sparse File Sizes in Database Snapshots and the "DBCC Internal Database Snapshot Usage" section in DBCC (Transact-SQL).
If a snapshot cannot be created DBCC CHECKCATALOG acquires an exclusive database lock to obtain the required consistency. If any inconsistencies are detected, they cannot be repaired and the database must be restored from a backup.
Running DBCC CHECKCATALOG against tempdb does not perform any checks. This is because, for performance reasons, database snapshots are not available on tempdb. This means that the required transactional consistency cannot be obtained. Recycle the server to resolve any tempdb metadata issues.
DBCC CHECKCATALOG does not check FILESTREAM data. FILESTREAM stores binary large objects (BLOBS) on the file system.
DBCC CHECKCATALOG is also run as part of DBCC CHECKDB.
If no database is specified, DBCC CHECKCATALOG returns:
If AdventureWorks2008R2 is specified as the database name, DBCC CHECKCATALOG returns: