What is use of DBCC Commands?
DBCC (Database consistency checker) act as Database console commands for SQL Server to check database consistency.
They are grouped as:
Maintenance: Maintenance tasks on Db, filegroup, index etc. Commands include DBCC CLEANTABLE, DBCC INDEXDEFRAG, DBCC DBREINDEX, DBCC SHRINKDATABASE, DBCC DROPCLEANBUFFERS, DBCC SHRINKFILE, DBCC FREEPROCCACHE, and DBCC UPDATEUSAGE.
Miscellaneous: Tasks such as enabling tracing, removing dll from memory. Commands include DBCC dllname, DBCC HELP, DBCC FREESESSIONCACHE, DBCC TRACEOFF, DBCC FREESYSTEMCACHE, and DBCC TRACEON. Informational: Tasks which gather and display various types of information. Commands include DBCC INPUTBUFFER, DBCC SHOWCONTIG, DBCC OPENTRAN, DBCC SQLPERF, DBCC OUTPUTBUFFER, DBCC TRACESTATUS, DBCC PROCCACHE, DBCC USEROPTIONS, and DBCC SHOW_STATISTICS.
Validation: Operations for validating on Db, index, table etc. Commands include DBCC CHECKALLOC, DBCC CHECKFILEGROUP, DBCC CHECKCATALOG, DBCC CHECKIDENT, DBCC CHECKCONSTRAINTS, DBCC CHECKTABLE, and DBCC CHECKDB.What is use of DBCC Commands?
Database Consistency Checker Commands give details in form of statistics about the SQL Server. They can be used for Maintenance of database, index, or filegroup. DBCC Commands can be used to perform validation operations on a database, table, index, catalog, filegroup, or allocation of database pages.
They can perform miscellaneous tasks such as enabling trace flags or removing a DLL from memory. DBCC INDEXDEFRAG, DBCC ERRORLOG, DBCC CACHESTATS are one of the few DBCC commands.