List SQL Server DBCC commands using trace 2520 – documented and undocumented commands

16 February,2013 by Jack Vamvas

Question: How can I generate a list of all SQL Server DBCC commands including all documented and undocumented?

Answer: Using DBCC TRACEON – which enables the  2520 trace flag, you can then list all documented and undocumented Database Control Commands(DBCC) .

Microsoft Customer Support Services do not support undocumented commands -  therefore , familiarise yourself with the DBCC details before executing them

 

dbcc traceon(2520)
      dbcc help ('?')
      GO

 

 

Executing the syntax returns on a SQL Server 2008 Enterprise Edition

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

checkcatalog

checkconstraints

checkdb

checkfilegroup

checkident

checktable

cleantable

dbreindex

dropcleanbuffers

free

freeproccache

freesessioncache

freesystemcache

help

indexdefrag

inputbuffer

opentran

outputbuffer

pintable

proccache

show_statistics

showcontig

shrinkdatabase

shrinkfile

sqlperf

traceoff

traceon

tracestatus

unpintable

updateusage

useroptions

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

 

Read More

DBCC CHECKDB - SQL Server DBA

SQL Server - DBCC checktable - SQL Server DBA

DBCC SQLPERF(netstats) and network activity - SQL Server DBA

 

 


Author: Jack Vamvas (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 List SQL Server DBCC commands using trace 2520 – documented and undocumented commands


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