DBA Myths: CHECKDB runs on startup.

2

September 16, 2019 by Kenneth Fisher

If you look at your error log you’ll (hopefully) see entries like this shortly after the instance startup:

CHECKDB for database ‘StackOverflow2013’ finished without errors on 2018-06-28 11:13:32.420 (local time). This is an informational message only; no user action is required.

And a lot of people I know think Great! CHECKDB has been run with no errors!

And yay! It did. In 2018.

Look at the date. It’s just a notification of the last successful run of CHECKDB for this database. It’s not being re-run, and if you think about it it makes perfect sense. I mean if you have a terabyte-sized DB think about how long an instance startup would take if SQL ran a CHECKDB every time you start up your system.

What we are actually getting in the log is the last time CHECKDB was run for each DB without errors. If a database doesn’t show up it’s never been run or at least never run without finding an issue. If you regularly parse your log information then it would be useful to make sure that CHECKDB is being run regularly and it’s a handy place to check on a system that’s new to you. But don’t get confused and think that it’s actually being run!

2 thoughts on “DBA Myths: CHECKDB runs on startup.

  1. IM Fletcher says:

    Thanks – I’m going to go have to review my logs now.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 6,758 other subscribers

Follow me on Twitter

Archives

ToadWorld Pro of the Month November 2013