O'Reilly logo

Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition by Mark Spenik, Orryn Sledge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required