Worth Corner, Crawley, RH10 7SL

Support Hours - Mon-Sat, 8.00-18.00

Welcome to our SQL Server blog

This blog was created in order to pass on some of our knowledge and advice in the hope that the community might find it useful.

Obviously Microsoft SQL Server is our area of expertise and therefore this is our most thorough blog with everything from the basic through to the the incredibly advanced and, as such, we should have something for everyone within our pages.

Help for Undocumented DBCC Commands
Published: Nov 27, 2016
This episode of Fun with Flags is used in conjunction with my previous post about TF 3604.

Undocumented DBCC commands are written about all over the place and, although undocumented and therefore also generally unsupported, people seem to love them. I use them myself in all manner of places, never in production code, but they still get used. The biggest problem though, is knowing how to use them.

This Trace Flag helps with this as it can unlock help text for undocumented DBCC commands, allowing you to make the most of these hidden gems.

As an example, here’s how we would normally look at help for a DBCC command:

dbcc help ('checkDB')

Handy. Now we have a brief description of the input variable options and can play away.

So what about undocumented commands?

dbcc help ('page')

As you can see, there’s no help there… but is there? This is where TF 2588 is required... it unlocks the hidden help text for these commands… HOWEVER, it still won’t return it to the messages window without our friend TF3604. Combine them and everything is revealed:

dbcc traceon(3604)
dbcc traceon(2588)

dbcc help ('page')

To make things clearer, just remove the info messages:

dbcc traceon(3604) with no_infomsgs
dbcc traceon(2588) with no_infomsgs

dbcc help ('page') with no_infomsgs

Now you can have a look at the help for some undocumented commands and have a play… in test, of course!!!
Leave a Comment
Your email address will not be published. All fields are mandatory.
NB: Comments will only appear once they have been moderated.

SQL  World  CEO
Kevin  Urquhart

iPhone Selfie

I am a SQL Server DBA, Architect, Developer, Trainer, and CEO of SQL World. This is my blog in which I’m simply trying to share my SQL knowledge and experiences with the world.


© Copyright 2020 SQLTraining Ltd.