What are all the dbcc commands for SQL Server?
March 4, 1999
A. All the documented ones are in the books online, or in publiclyaccessible knowledgebase articles. The rest are undocumented because they areeither irrelevant to people outside MS, or their use is dangerous and is to bediscouraged.
The undocumented dbcc commands vary from release to release and there aresure to be a lot more new ones in SQL 7.0 as well as ones that have beenremoved.
However as people always want to know, here is a predominantly Sybase basedlist that will mostly work with SQL 6.5 and below - however there are noguarantees. Which will work against SQL 7.0 is even more of a lottery.
Feel free to use any of these against a test system, but don't expect anyhelp if you use any of them that are not documented officially elsewhere.
allocdump( dbid, page )
bhash( { print_bufs | no_print }, bucket_limit )
buffer( [ dbid ][, objid ][, nbufs ], printopt={ 0 | 1 | 2 }, buftype )
bytes( startaddress, length )
checkalloc[( dbname [, fix | nofix ] ) ]
checkcatalog[( dbname )]
checkdb[( dbname [, skip_ncindex ] ) ]
checktable( tablename | tabid [, skip_ncindex ] )
dbinfo( [ dbname ] )
dbrepair( dbid, option={ dropdb | fixindex | fixsysindex }, table, indexid)
dbtable( dbid )
delete_row( dbid, pageid, delete_by_row={ 1 | 0 }, rownum )
des( [ dbid ][, objid ] )
extentcheck( dbid, objid, indexid, sort={1|0} )
extentchain( dbid, objid, indexid, sort={1|0},display(1,0) )
extentdump( dbid, page )
extentzap( dbid, objid, indexid, sort )
findnotfullextents( dbid, objid, indexid, sort={ 1 | 0 } )
fix_al( [ dbname ] )
help( dbcc_command )
ind( dbid, objid, printopt={ 0 | 1 | 2 } )
indexalloc(tablename|tabid, indid, [full | optimized | fast],[fix | nofix])
locateindexpgs( dbid, objid, page, indexid, level )
lock
log( [dbid][,objid][,page][,row][,nrecords][,type={-1..36}],printopt={0|1})
memusage
netmemshow( option={1 | 2 | 3} )
netmemusage
newalloc( dbname, option={ 1 | 2 | 3 } )
page( dbid, pagenum [, printopt={0|1|2} ][, cache={0|1} ][, logical={1|0} ])
pglinkage( dbid, start, number, printopt={0|1|2}, target, order={1|0} )
pktmemshow( option={spid} )
procbuf( dbid, objid, nbufs, printopt={ 0 | 1 } )
prtipage( dbid, objid, indexid, indexpage )
pss( suid, spid, printopt={ 1 | 0 } )
rebuildextents( dbid, objid, indexid )
resource
show_bucket( dbid, pageid, lookup_type )
tab( dbid, objid, printopt={ 0 | 1 | 2 } )
tablealloc(tablename|tabid, [full | optimized | fast],[fix | nofix])
traceoff( tracenum [, tracenum ... ] )
traceon( tracenum [, tracenum ... ] )
undo( dbid, pageno, rowno )
About the Author
You May Also Like