Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

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)

Verify Last successful CHECKDB on all databases

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.

Total article views: 3648 | Views in the last 30 days: 8
 
Related Articles
FORUM

CHECKDB

CHECKDB

FORUM

DBCC CHECKDB - System databases

DBCC CHECKDB - System databases

FORUM

CHECKDB

CHECKDB - schedule

FORUM

dbcc checkdb

dbcc checkdb

BLOG

DBCC CHECKDB

Quite often when I see a new SQL Server setup, a CHECKDB has never been run on the databases. It’s.....

 
Contribute