Table 10-1 summarizes the checks performed by the dbcc commands. Table 10-2 compares the different dbcc commands.
Checks performed |
checkstorage |
checktable |
checkdb |
checkalloc |
indexalloc |
tablealloc |
checkcatalog |
textalloc |
---|---|---|---|---|---|---|---|---|
Allocation of text valued columns |
X |
X1 |
||||||
Index consistency |
X |
X |
||||||
Index sort order |
X |
X |
||||||
OAM page entries |
X |
X |
X |
X |
X |
X |
X |
|
Page allocation |
X |
X |
X |
X |
X |
|||
Page consistency |
X |
X |
X |
|||||
Pointer consistency |
X |
X |
X |
|||||
System tables |
X |
X2 |
||||||
Text column chains |
X |
X |
X |
X |
||||
Text valued columns |
X |
X |
X |
X3 |
1textalloc does not check the allocation status for data pages holding columns, but does check the allocation status for text pages.
2textalloc checks the syspartition entry corresponding to the text or image column.
3 textalloc checks:
The data page that holds the text valued columns
The text page in which it saves the text values.
You can run all dbcc commands except dbrepair and checkdb with the fix option
while the database is active.
Only the table owner can execute dbcc with the checktable, fix_text, or reindex keywords. Only the database owner can use the checkstorage, checkdb, checkcatalog, checkalloc, indexalloc, textalloc, and tablealloc keywords. Only a system administrator can use the dbrepair keyword.