What SQL Server DBCC CHECKDB did.

Source: Internet
Author: User
Tags what sql

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.