Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

Help command in sql for undocumented commands

21 February,2017 by Tom Collins

Question: I can get the help details for a dbcc sql command via the DBCC HELP function. For example, something like

DBCC HELP('CHECKDB') will display the usage details for the DBCC CHECKDB. A very useful function which saves me time from checking the MSDN site.

But if I’m using an undocumented command such as DBCC AUTOPILOT I get :

Msg 8987, Level 16, State 1, Line 1

No help available for DBCC statement 'AUTOPILOT'.

 

Is there a way of accessing DBCC HELP details for sql undocumented tasks?

 

Answer: The way to accesss the DBCC HELP details for undocumented sql commands is to utilise the DBCC TRACEON(2588). Enabling this trace will allow you to report on sql undocumented commands , at the click of a button.

No need to serach around for the docuementation on the internet.

For example:

DBCC TRACEON (2588)

DBCC HELP('AUTOPILOT')

 

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

dbcc AUTOPILOT (typeid [, dbid [, {maxQueryCost | tabid [, indid [, pages [, flag [, rowcounts]]]]} ]])

 

Read More

List SQL Server DBCC commands using trace 2520 – documented ...

3 ways to have fun with DBCC PAGE (SQL Server DBA)


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Help command in sql for undocumented commands


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer