The first step:
After reading the system metadata and reading the data, DBCC CHECKDB knows what kind of database it is going to detect, and if there is an error in this step, DBCC will make a direct error.
And will not run anymore.
Step Two:
The DBCC CHECKALLOC command is run against the database inside DBCC CHECKDB
DBCC CHECKALLOC
Step Three:
Perform DBCC CHECKTABLE (TABLE_NAME) on each table and view of the database;
DBCC CHECKTABLE (Nums);
DBCC CHECKTABLE is primarily detected
1. Whether to link index pages correctly, LOB pages, line overflow pages.
2, the index is not the correct order.
3, each pointer is consistent.
4, the data on the page is reasonable
5. Whether each nonclustered index of the table has a matching row, and whether each data row has a nonclustered index that matches it.
6. For partitioned tables, whether each row is in a reasonable partition.
Fourth Step:
DBCC CHECKCATALOG checks for directory consistency within a specified database
DBCC CHECKCATALOG (Studio);
Fifth Step:
Detects the contents of the view and the server Broker data.
What SQL Server DBCC CHECKDB did.