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.

Your SQL Trainer
Kevin Urquhart

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

Kevin Urquhart
SQL Server Consultant, London

Categories


Archives


Copyright © 2018 London SQL Server Training Courses @ SQL Training | Website Design From Scott Heron