Checking and Repairing Database Integrity

DBCC CHECKDB is a Transact-SQL command that is frequently used for checking the logical and physical integrity of databases. Essentially, DBCC CHECKDB is a superset command that actually runs three checks (CHECKALLOC, CHECKTABLE, and CHECKCATALOG) by issuing a single command.

The following are some recommendations for using DBCC CHECKDB to check and repair SQL database integrity:

• Always ensure that recent backups are on hand before running the command.

• Generally it is better to run the DBCC CHECKDB superset command than to execute the individual operations, because this will serve to identify the majority of the errors and is generally safe to run in a production environment.

• After DBCC CHECKDB ...

Get Microsoft® Lync® Server 2013 Unleashed Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.