Blog Post

Simplify Your DBCC CHECKDB Output

,

Defend Your Data

"Defend Your Data"

If you’re a SQL Server Database Administrator and you don’t know what CHECKDB is then you need to stop whatever it is your are doing right now and read this. Seriously, just go ahead and do it now. It will only take you ten minutes to get to grips with the basics and it could save not only your job but also the company you work for. CHECKDB is arguably the most valuable tool in the DBA toolkit and you would be a fool to miss it.

Now as I’m sure you already know, when you perform a DBCC CHECKDB operation, by default you will be provided with a considerable amount of informational output, not all of which you may be interested in.

If like me, you like to make life easy for yourself and you are really only interested in output pertaining to any errors that have been found, then you will pleased to hear of the handy argument NO_INFOMSGS available to you (see example below). Using this argument with your CHECKDB operations will suppress “informational only” output, leaving you in a position to more easily identify any errors that may have been reported.

DBCC CHECKDB(‘DatabaseName’) WITH NO_INFOMSGS, ALL_ERRORMSGS

Note: Technically you do not need to use the ALL_ERRORMSGS argument for errors to be displayed in the more recent versions of SQL Server as this is the default behaviour however, if like a lot of DBA’s you manage multiple versions of SQL Server then it’s good practice to include it in order to be absolutely certain you will get the output your desire across the board.

Life’s complicated enough as it is, so let’s keep things simple when we can.

Similar Posts on “keeping things simple” and “looking after your data”

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating