Best practice on DBCC CHECKDB

Igor Gelin 21 Reputation points
2021-10-13T14:18:07.413+00:00

Hi all,

Should we ever run DBCC CHECKDB against sql server system databases?

Thanks,

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,691 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 100.9K Reputation points MVP
    2021-10-13T21:30:41.353+00:00

    Yes. You should regularly run DBCC CHECKDB on master, model and msdb. They too can become corrupted if your hardware is having a bad day.

    You could argue that since tempdb is being recreated when SQL Server restartes, it is less critical. Then again:

    1. You may not restart SQL Server that often, and you get corruption in system tables, you will still have a problem.
    2. And even if corruption is only in tempdb, it is still an indication that your hardware is wonky and needs inspection/replacement.
    0 comments No comments

  2. CathyJi-MSFT 21,086 Reputation points Microsoft Vendor
    2021-10-14T02:44:03.557+00:00

    Hi @Igor Gelin ,

    Yes, you should run it against master, model, msdb and tempdb, plus all your user databases.

    Below is a good blog about DBCC CheckDB, suggest you reading it. It will make you better understand DBCC CheckDB.

    DBCC CheckDB FAQ: Check for Corruption in SQL Server


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.

    0 comments No comments