The database consistency checker (dbcc) provides commands for checking the logical and physical consistency of a database. Two major functions of dbcc are:
Checking page linkage and data pointers at both the page level and the row level using checkstorage or checktable and checkdb
Checking page allocation using checkstorage, checkalloc, checkverify, tablealloc, and indexalloc
dbcc checkstorage stores the results of checks in the dbccdb database. You can print reports from dbccdb using the dbcc stored procedures.
Use the dbcc commands:
As part of regular database maintenance – the integrity of the internal structures of a database depends upon the System Administrator or Database Owner running database consistency checks on a regular basis.
To determine the extent of possible damage after a system error has occurred.
Before backing up a database for additional confidence in the integrity of the backup.
If you suspect that a database is damaged – for example, if using a particular table generates the message “Table corrupt,” you can use dbcc to determine if other tables in the database are also damaged.
If you are using Component Integration Services, there are additional dbcc commands you can use for remote databases. For more information, see the Component Integration Services User’s Guide.