July 23, 2008 at 10:04 am
I have a server with several hundred databases. Running dbcc checkdb on all databases takes several hours. Comparatively, restarting sql only takes several minutes. Looking at the sql error log after a restart, I see CHECKDB events for each database.
Based on this information, there must be a difference in how CHECKDB is run in these 2 situations, otherwise it would seem that it should take several hours for sql to restart.
Any ideas? My only thought is that checkdb is run simultaneous on all dbs during a restart.
Regards,
Rubes
July 23, 2008 at 3:42 pm
If you look at the messages in the error log, you'll see that they're telling you the last time the CHECKDB ran cleanly for each database. This is a new feature I put into SQL 2005 - the 'last known good' is stored in the boot page of each database and reported on database startup.
If you having problems running CHECKDBs in whatever maintenance window you have, checkout this blog post:
Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
July 23, 2008 at 10:27 pm
Wow, I can't believe I didn't notice the timestamp on the CHECKDB. You've answered my question clearly. Thank you. And thanks for the article link.
Regards,
Rubes
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply