This post will be updated regularly as I work through all the DBCC commands.
Using ‘DBCC HELP command’ will provide the help and options for a given DBCC command. Use it as follows:
1 |
DBCC HELP CHECKDB |
…will produce the following output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
-- 6:54:06 PM -- DBCC CHECKDB ( { 'database_name' | database_id | 0 } [ , NOINDEX | { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ] ) [ WITH { [ ALL_ERRORMSGS ] [ , [ NO_INFOMSGS ] ] [ , [ TABLOCK ] ] [ , [ ESTIMATEONLY ] ] [ , [ PHYSICAL_ONLY ] ] [ , [ DATA_PURITY ] ] [ , [ EXTENDED_LOGICAL_CHECKS ] ] } ] |
Maintenance DBCC Commands
The following commands will create a read-only snapshot of the database(s). If the command cannot create a snapshot or is not required, it will perform the check on the actual database and use table-locking to perform the check.
The following commands use and internal snapshot to perform their checks:
DBCC CHECKALLOC
DBCC CHECKDB
DBCC CHECKCATALOG
DBCC CHECKFILEGROUP
DBCC CHECKTABLE
Views – 1838