Saturday, March 26, 2011

Essential DBCC Commands in SQL Server

DBCC CHECKALLOC - Check consistency of disk allocation.
DBCC CHECKCATALOG - Check catalog consistency
DBCC CHECKCONSTRAINTS - Check integrity of table constraints.
DBCC CHECKDB - Check allocation, and integrity of all objects.
DBCC CHECKFILEGROUP - Check all tables and indexed views in a filegroup.
DBCC CHECKIDENT - Check identity value for a table.
DBCC CHECKTABLE - Check integrity of a table or indexed view.
DBCC CLEANTABLE - Reclaim space from dropped variable-length columns.
DBCC dllname - Unload a DLL from memory.
DBCC DROPCLEANBUFFERS - Remove all clean buffers from the buffer pool.
DBCC FREE... CACHE - Remove items from cache.
DBCC HELP - Help for DBCC commands.
DBCC INPUTBUFFER - Display last statement sent from a client to a database instance.
DBCC OPENTRAN - Display information about recent transactions.
DBCC OUTPUTBUFFER - Display last statement sent from a client to a database instance.
DBCC PROCCACHE - Display information about the procedure cache
DBCC SHOW_STATISTICS - Display the current distribution statistics
DBCC CHECKALLOC - Check consistency of disk allocation.
DBCC CHECKCATALOG - Check catalog consistency
DBCC CHECKCONSTRAINTS - Check integrity of table constraints.
DBCC CHECKDB - Check allocation, and integrity of all objects.
DBCC CHECKFILEGROUP - Check all tables and indexed views in a filegroup.
DBCC CHECKIDENT - Check identity value for a table.
DBCC CHECKTABLE - Check integrity of a table or indexed view.
DBCC CLEANTABLE - Reclaim space from dropped variable-length columns.
DBCC dllname - Unload a DLL from memory.
 DBCC DROPCLEANBUFFERS - Remove all clean buffers from the buffer pool.
 DBCC FREE... CACHE - Remove items from cache.
 DBCC HELP - Help for DBCC commands.
 DBCC INPUTBUFFER - Display last statement sent from a client to a database instance.
 DBCC OPENTRAN - Display information about recent transactions.
 DBCC OUTPUTBUFFER - Display last statement sent from a client to a database instance.
 DBCC PROCCACHE - Display information about the procedure cache
 DBCC SHOW_STATISTICS - Display the current distribution statistics
 DBCC SHRINKDATABASE - Shrink the size of the database data and log files.
 DBCC SHRINKFILE - Shrink or empty a database data or log file.
 DBCC SQLPERF - Display transaction-log space statistics. Reset wait and latch statistics.
 DBCC TRACE... - Enable or Disable trace flags
 DBCC UPDATEUSAGE - Report and correct page and row count inaccuracies in catalog views
 DBCC USEROPTIONS - Return the SET options currently active


 DBCC deprecated commands


SHRINKDATABASE - Shrink the size of the database data and log files.
DBCC SHRINKFILE - Shrink or empty a database data or log file.
DBCC SQLPERF - Display transaction-log space statistics. Reset wait and latch statistics.
DBCC TRACE... - Enable or Disable trace flags
DBCC UPDATEUSAGE - Report and correct page and row count inaccuracies in catalog views
DBCC USEROPTIONS - Return the SET options currently active
DBCC deprecated commands

1 comment:

  1. Great List, i have used some of them.

    Thanks for sharing.

    ReplyDelete

Contributors