Tuesday, February 14, 2012

Dbcc Checkdb

How often do you run it in your shop?

I'm seeing (from the new SQL Best Practices Analyzer) that MS recommends that it be done once every two weeks on SQL 2005.

I have never been in the habit of running it in production. I have never experienced database corruption in any form.

Just curious.

Regards,

hmscotthere i run it every night on every database, but our databases are relatively small. In larger environments, I typically make it part of the Sunday night maintenance.

corruption does happen. i had checkdb failing on one database once and the table it was failing on had more rows in it than was being returned by a SELECT * FROM. It was a small lookup table on a development server, so I just rebuilt it, but it was weird. You could see the rows in the EM but not by querying from the QA.|||Nightly, on ALL databases, ALL environments, including system DB's. The sproc also shoots out a nice big red-letter email if it finds anything. (I can post it here, or PM it to you, if you want to see it. I'm a horrible coder, but feel free to bend, fold, or mutilate it how you see fit.)

If you don't want to run it in production, I'd recommend restoring some prod db's to another server, and running it there. I do that a lot, too.

If you haven't seen it already, Paul Randal has a nice presentation online all about DB corruption best practices. Great stuff.

http://www.microsoft.com/emea/itsshowtime/sessionh.aspx?videoid=549

Good luck.

-D.|||If you don't want to run it in production, I'd recommend restoring some prod db's to another server, and running it there. I do that a lot, too.I believe this scores very highly on Best Practice as it tests your DR too.
We don't do it here mind :rolleyes:|||If you haven't seen it already, Paul Randal has a nice presentation online all about DB corruption best practices. Great stuff.

http://www.microsoft.com/emea/itsshowtime/sessionh.aspx?videoid=549

-D.

Now THAT was a great presentation.

Thank you for the link.

Regards,

hmscott

No comments:

Post a Comment