Export (0) Print
Expand All

DBCC CHECKCATALOG

SQL Server 2000

Checks for consistency in and between system tables in the specified database.

Syntax

DBCC CHECKCATALOG
    ( 'database_name'
    )
    [ WITH NO_INFOMSGS ]

Arguments

'database_name'

Is the database for which to check system table consistency. If not specified, the default is the current database. Database names must conform to the rules for identifiers. For more information, see Using Identifiers.

WITH NO_INFOMSGS

Suppresses all informational messages and the report of space used when there are less than 200 error messages. If not specified, DBCC CHECKCATALOG displays all error messages. DBCC CHECKCATALOG messages are sorted by object ID, except for those messages generated from tempdb.

Remarks

DBCC CHECKCATALOG checks that every data type in syscolumns has a matching entry in systypes and that every table and view in sysobjects has at least one column in syscolumns.

Result Sets

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.
Permissions

DBCC CHECKCATALOG permissions default to members of the sysadmin fixed server role, the db_owner and db_backupoperator fixed database roles, and are not transferable.

Examples

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

See Also

DBCC

System Tables

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft