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]]]]} ]])
List SQL Server DBCC commands using trace 2520 – documented ...
3 ways to have fun with DBCC PAGE (SQL Server DBA)
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |