Checks for consistency in and between system tables in the specified database.
DBCC CHECKCATALOG
( 'database_name'
) [WITH NO_INFOMSGS]
DBCC CHECKCATALOG checks that every data type in syscolumns has a matching entry in systypes and that every table and view in sysobjects have at least one column in syscolumns.
If no database is specified, DBCC CHECKCATALOG returns this result set (message):
DBCC results for 'current database'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
If Northwind is provided as a database name, DBCC CHECKCATALOG returns this result set (message):
DBCC results for 'Northwind'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
DBCC CHECKCATALOG permissions default to members of the sysadmin fixed server role or the db_owner fixed database role, and are not transferable.
This example checks the allocation and structural integrity of objects in both the current database and in the pubs database.
-- Check the current database.
DBCC CHECKCATALOG
GO
-- Check the pubs database.
DBCC CHECKCATALOG ('pubs')
GO
System Tables | DBCC |