Consistency-Checking Commands Other Than DBCC CHECKDB

In this section, I explain what each of the DBCC CHECK. . . commands does. Historically, there has been much confusion about what all the different consistency-checking DBCC commands do, which ones should be performed, and in what order. DBCC CHECKDB includes the functionality of all DBCC CHECK. . . commands except DBCC CHECKIDENT and DBCC CHECKCONSTRAINTS.

DBCC CHECKALLOC

DBCC CHECKALLOC performs the following:

  • Primitive system-catalog consistency checks

  • Allocation consistency checks on the database

It uses a database snapshot by default and has the same options as for DBCC CHECKDB, except for the following:

  • PHYSICAL_ONLY

  • REPAIR_REBUILD

  • DATA_PURITY

None of these options make sense for allocation consistency ...

Get Microsoft® SQL Server® 2008 Internals 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.