Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Kyle Neier,
After reading an interesting blog post from Paul Randal about how to verify the last good CHECKDB that occurred for a database, I decided that I would create a report to add to my daily monitoring regimen.
This script is the basis for my report. It utilizes a feature in SQL Server 2005 which records the most recent successful CHECKDB in the boot page of the database.
I enumerate through each database using a cursor and return a simple result set to tell me the most recent occurrence of a successful CHECKDB, how many days it has been, and how many hours it has been. I then have this as the source of an Excel database query for each of the instances I support. It is a quick and dirty way to monitor the integrity of your databases.
DBCC CHECKDB - System databases
CHECKDB - schedule
Quite often when I see a new SQL Server setup, a CHECKDB has never been run on the databases. It’s.....