DBCC CHECKDB
DBCC CHECKDB: administrative check or maintenance
What changes
- Input
- database, table, index, cache or server state named in the command
- Output or change
- messages or result sets; maintenance forms change storage, caches or metadata
Syntax at a glance
DBCC CHECKDB [ [ ( database_name | database_id | 0 [ , NOINDEX | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ] ) ] [ WITH { [ ALL_ERRORMSGS ] [ , EXTENDED_LOGICAL_CHECKS ] [ , NO_INFOMSGS ] [ , TABLOCK ] [ , ESTIMATEONLY ] [ , { PHYSICAL_ONLY | DATA_PURITY } ] [ , MAXDOP = number_of_processors ] } ] ]
Work example
A recovery review needs a full database consistency check.
Plan I/O and runtime, preserve output, and prefer a restored copy for incident triage.
Check your work The full check reports no errors or the recovery plan addresses each reported error.
Open Microsoft Learn for full syntax, permissions, and details for your version.