How to know how much time did it take to run database integrity check for all databases on a instance.

I simply need when it started and when its finished.

I am able to query when the last check db was performed, but I was not able to query the duration of the check db.

The goal is to concentrate on the longest time and speed it up somehow.

  • 1
    How are you performing CHECKDB? Oct 11 at 20:07
  • For this particular server it's been set up as maintenance plan.
    – Serdia
    Oct 11 at 20:09
  • Thank you @Charlieface. This very helpful
    – Serdia
    Oct 12 at 5:18

I think in comments you mentioned using maintenance plans. Its been a long time, almost over 6 years since i have used maintenance plans to perform database maintenance. But per my knowledge those are tracked under SQL server agent job history , so you can query msdb database to get those metrics.

However i personally recommend doing this via ola hallengren integrity checks. It has a very useful parameter called LogToTable which will capture all the needed information for your DBCC CHECKDB related metrics. You can then do further analysis on run time and additional info logged.

Note- Using that tool gives you wide range of additional parameters to improve the performance of CHECKDB

Not the answer you're looking for? Browse other questions tagged or ask your own question.