DBCC Commands for Verification

The following DBCC commands are used for verification:

CHECKALLOC

CHECKCATALOG

CHECKDB

CHECKFILEGROUP

CHECKIDENT

CHECKTABLE

DBREINDEX

SHOWCONTIG

UPDATEUSAGE

CHECKALLOC

Syntax

DBCC CHECKALLOC 
( 'database_name'
[, NOINDEX
|
{ REPAIR_ALLOW_DATA_LOSS
| REPAIR_FAST
| REPAIR_REBUILD
}]
) [WITH {ALL_ERRORMSGS | NO_INFOMSGS}]

CHECKALLOC scans the database to ensure that data page allocation is correct. In SQL Server 2000, CHECKALLOC should be used instead of NEWALLOC. This is ironic, because in version 6.x Microsoft told us to use NEWALLOC instead of CHECKALLOC!

See Table B.1 for an explanation on the REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD options.

NOTE

CHECKALLOC does not need to be run if CHECKDB is run. The ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, 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.