List of All Undocumented DBCC Commands in SQL Server


As a SQL Server DBA, it is very command to use various DBCC commands to retrieve data required to understand problems or to get the certain status information or details. DBCC stands for Database Console Commands. There are many documented and undocumented DBCC commands in SQL Server which are very useful for DBAs and are used in different usage like to retrieve usage information, to run maintenance tasks, To validate databases, and other Miscellaneous purposes.

Below are some of the undocumented DBCC commands. Undocumented DBCC commands are used by Microsoft support to get more insights about internal behavior.

Note: Please note that it is not recommended to use the undocumented DBCC commands and Microsoft does no provide any support for the behaviour caused by using undocumented DBCC commands.

DBCC AddExtendedProc(procname, DLL) – This command adds an extended procedure to the list maintained. It has same functionality of sp_addextendedproc stored procedure.

DBCC ADDINSTANCE(Object,Instance) – This command is used to add an object’s instance to the performance monitor.

DBCC BYTES(StartingAddress, Length) – This command returns the content of the memory area beginning at StartinAddress for length BYTES.

DBCC CALLFULLTEXT(FuncID[,CatID][,ObjID]) – This command is used to perform a variety if Full-Text related functions.

DBCC DBRecover(DBName) – This command can be used to manually recover the database. Normally databases are recovered at system startup, but for some reason if they fail, we can use this to recover the database manually.

DBCCC DBTable(DBID) – This command lists internal structures DB Table and FCB (File Control Block).

DBCC DELETEINSTANCE(Object,Instance) – This command is used to delete an object’s instance from the performance monitor which was previously set using ADDINSTANCE.

DBCC DES(DBID,ObjID) – This command lists system level descriptive information of the specified object.

DBCC DetachDB(DBName) – This command can be used to detach a database from the SQL Server instance.

DBCC DROPCLEANBUFFERS – This command can be used to clear or remove all the data from the memory.

DBCC DropExtendedProc(procname, DLL) – This command drops an extended procedure from the list maintained. It has same functionality of sp_dropextendedproc stored procedure.

DBCC ERRORLOG – This command closes the current errorlog and creates a new errorlog. This command is similar to sp_cycle_errorlog.

DBCC ExtentInfo(DBName, TableName, IndexID) – This command is used for listing the extent information for specified object.

DBCC FLUSHPROCINDB(DBID) – This command is used to force all the storedProcedures to be recomplied in specified database.

DBCC IND(DBID, ObjID[,PrintOpt{0|1|2}]) – This command can be used to list the system level index information for the specified object.

DBCC LockObjectsSchema(ObjectName) – This can be used to block other connections from modifying the schema of the specified object.

DBCC LOG(DBID) – This command is used to display the log record information from the specified database transaction log.

DBCC PRTIPAGE(DBID, ObjID, IndexID[,PrintOpt{0|1|2}]) – This command can be used to list the PAGE information for the specified index.

DBCC Resource – This can be used to list the resource usage information of the server.

DBCC TAB(DBID, ObjID[,PrintOpt{0|1|2}]) – This command lists system related information of specified table.

DBCC UpgradeDB(DBName) – This command is used to upgrade the system objects of specified database to the version of database engine.

Hope this was helpful.

SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.


Leave a Reply

Your email address will not be published. Required fields are marked *