Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

John Sansom - SQL Server DBA in the UK

John Sansom (Blog | Twitter) is a Microsoft Certified Master (MCM) of SQL Server and publisher of the free SQL community ebook DBA JumpStart, an inspiring collection of advice for Data Professionals, written by 20 SQL Server experts. Awarded the Microsoft Community Contributor(MCC) award, John is a prolific blogger and can be found regularly writing about SQL Server and Professional Development over at www.johnsansom.com.

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”

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.