0

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.

Serdia
  • 707
  • 1
  • 8
  • 16

1 Answers1

4

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

KASQLDBA
  • 7,203
  • 6
  • 30
  • 53