Friday, April 16, 2010

List of Undocumented DBCC STATEMENTS which works with SQL Server 2000

1. DBCC activecursors [(spid)]
2. DBCC addextendedproc (function_name, dll_name)
3. DBCC addinstance (objectname, instancename)
4. DBCC adduserobject (name)
5. DBCC auditevent (eventclass, eventsubclass, success, loginname, rolename,
dbusername, loginid)
6. DBCC autopilot (typeid, dbid, tabid, indid, pages [,flag])
7. DBCC balancefactor (variance_percent)
8. DBCC bufcount [(number_of_buffers)]
9. DBCC buffer ( {‘dbname’ | dbid} [, objid [, number [, printopt={0|1|2} ][,
dirty | io | kept | rlock | ioerr | hashed ]]])
10. DBCC bytes ( startaddress, length )
11. DBCC cachestats
12. DBCC callfulltext
13. DBCC checkalloc [('database_name'[, NOINDEX | REPAIR])] [WITH NO_INFOMSGS[,
ALL_ERRORMSGS][, ESTIMATEONLY]]
14. DBCC checkcatalog [('database_name')] [WITH NO_INFOMSGS]
15. DBCC checkconstraints [( 'tab_name' | tab_id | 'constraint_name' |
constraint_id )] [WITH ALL_CONSTRAINTS | ALL_ERRORMSGS]
16. DBCC checkdb [('database_name'[, NOINDEX | REPAIR])] [WITH NO_INFOMSGS[,
ALL_ERRORMSGS][, PHYSICAL_ONLY][, ESTIMATEONLY][, DBCC TABLOCK]
17. DBCC checkdbts (dbid, newTimestamp)]
18. DBCC checkfilegroup [( [ {'filegroup_name' | filegroup_id} ] [, NOINDEX] )]
[WITH NO_INFOMSGS[, ALL_ERRORMSGS][, PHYSICAL_ONLY][, ESTIMATEONLY][,
TABLOCK]]
19. DBCC checkident (‘table_name’[, { NORESEED | {RESEED [, new_reseed_value]} } ] )
20. DBCC checkprimaryfile ( {‘FileName’} [, opt={0|1|2|3} ])
21. DBCC checktable (‘table_name’[, {NOINDEX | index_id | REPAIR}]) [WITH
NO_INFOMSGS[, ALL_ERRORMSGS][, PHYSICAL_ONLY][, ESTIMATEONLY][, TABLOCK]]
22. DBCC cleantable (‘database_name’|database_id, ‘table_name’|table_id,
[batch_size])
23. DBCC cacheprofile [( {actionid} [, bucketid])
24. DBCC clearspacecaches (‘database_name’|database_id, ‘table_name’|table_id,
‘index_name’|index_id)
25. DBCC collectstats (on | off)
26. DBCC concurrencyviolation (reset | display | startlog | stoplog)
27. DBCC config
28. DBCC cursorstats ([spid [,'clear']])
29. DBCC dbinfo [('dbname')]
30. DBCC dbrecover (dbname [, IgnoreErrors])
31. DBCC dbreindex (‘table_name’ [, index_name [, fillfactor ]]) [WITH NO_INFOMSGS]
32. DBCC dbreindexall (db_name/db_id, type_bitmap)
33. DBCC dbrepair (‘dbname’, DROPDB [, NOINIT])
34. DBCC dbtable [({'dbname' | dbid})]
35. DBCC debugbreak
36. DBCC deleteinstance (objectname, instancename)
37. DBCC des [( {'dbname' | dbid} [, {'objname' | objid} ])]
38. DBCC detachdb [( 'dbname' )]
39. DBCC dropcleanbuffers
40. DBCC dropextendedproc (function_name)
41. DBCC dropuserobject (‘object_name’)
42. DBCC dumptrigger ({‘BREAK’, {0 | 1}} | ‘DISPLAY’ | {‘SET’, exception_number} |
{‘CLEAR’, exception_number})
43. DBCC errorlog
44. DBCC extentinfo [({'database_name'| dbid | 0} [, {'table_name' | table_id} [,
{'index_name' | index_id | -1}]])]
45. DBCC fileheader [( {'dbname' | dbid} [, fileid])
46. DBCC fixallocation [({'ADD' | 'REMOVE'}, {'PAGE' | 'SINGLEPAGE' | 'EXTENT' |
'MIXEDEXTENT'}, filenum, pagenum [, objectid, indid])
47. DBCC flush (‘data’ | ‘log’, dbid)
48. DBCC flushprocindb (database)
49. DBCC free dll_name (FREE)
50. DBCC freeproccache
51. DBCC freeze_io (db)
52. DBCC getvalue (name)
53. DBCC help (‘dbcc_command’ | ‘?’)
54. DBCC icecapquery (‘dbname’, stored_proc_name [, #_times_to_icecap (-1 infinite,
0 turns off)]) Use ‘dbcc icecapquery (printlist)’ to see list of SP’s to
profile. Use ‘dbcc icecapquery (icecapall)’ to profile all SP’s.
55. DBCC incrementinstance (objectname, countername, instancename, value)
56. DBCC ind ( { ‘dbname’ | dbid }, { ‘objname’ | objid }, { indid | 0 | -1 | -2 } )
57. DBCC indexdefrag ({dbid | dbname | 0}, {tableid | tablename}, {indid | indname})
58. DBCC inputbuffer (spid)
59. DBCC invalidate_textptr (textptr)
60. DBCC invalidate_textptr_objid (objid)
61. DBCC iotrace ( { ‘dbname’ | dbid | 0 | -1 }, { fileid | 0 }, bufsize, [ { numIOs
| -1 } [, { timeout (sec) | -1 } [, printopt={ 0 | 1 }]]] )
62. DBCC latch ( address [, 'owners'] [, 'stackdumps'])
63. DBCC lock ([{'DUMPTABLE' | 'DUMPSTATS' | 'RESETSTATS' |
'HASH'}]|[{'STALLREPORTTHESHOLD', stallthreshold}])
64. DBCC lockobjectschema (‘object_name’)
65. DBCC log ([dbid[,{0|1|2|3|4}[,['lsn','[0x]x:y:z’]|
['numrecs',num]|['xdesid','x:y']|
['extent','x:y']|['pageid','x:y']|
['objid',{x,'y'}]|['logrecs',{'lop'|op}...]|
['output',x,['filename','x']]…]]])
66. DBCC loginfo [({'database_name' | dbid})]
67. DBCC matview ({‘PERSIST’ | ‘ENDPERSIST’ | ‘FREE’ | ‘USE’ | ‘ENDUSE’})
68. DBCC memobjlist [(memory object)]
69. DBCC memorymap
70. DBCC memorystatus
71. DBCC memospy
72. DBCC memusage ([IDS | NAMES], [Number of rows to output])
73. DBCC monitorevents (’sink’ [, 'filter-expression'])
74. DBCC newalloc – please use checkalloc instead
75. DBCC no_textptr (table_id , max_inline)
76. DBCC opentran [({'dbname'| dbid})] [WITH TABLERESULTS[,NO_INFOMSGS]]
77. DBCC outputbuffer (spid)
78. DBCC page ( {‘dbname’ | dbid}, filenum, pagenum [, printopt={0|1|2|3} ][,
cache={0|1} ])
79. DBCC perflog
80. DBCC perfmon
81. DBCC pglinkage (dbid, startfile, startpg, number, printopt={0|1|2}, targetfile,
targetpg, order={1|0})
82. DBCC pintable (database_id, table_id)
83. DBCC procbuf [({'dbname' | dbid}[, {'objname' | objid}[, nbufs[, printopt = { 0 |
1 } ]]] )]
84. DBCC proccache
85. DBCC prtipage (dbid, objid, indexid [, [{{level, 0} | {filenum, pagenum}}]
[,printopt]])
86. DBCC pss [(uid[, spid[, printopt = { 1 | 0 }]] )]
87. DBCC readpage ({ dbid, ‘dbname’ }, fileid, pageid, formatstr [, printopt = { 0 |
1} ])
88. DBCC rebuild_log (dbname [, filename])
89. DBCC renamecolumn (object_name, old_name, new_name)
90. DBCC resource
91. DBCC row_lock (dbid, tableid, set) – Not Needed
92. DBCC ruleoff ({ rulenum | rulestring } [, { rulenum | rulestring } ]+)
93. DBCC ruleon ( rulenum | rulestring } [, { rulenum | rulestring } ]+)
94. DBCC setcpuweight (weight)
95. DBCC setinstance (objectname, countername, instancename, value)
96. DBCC setioweight (weight)
97. DBCC show_statistics (‘table_name’, ‘target_name’)
98. DBCC showcontig (table_id | table_name [, index_id | index_name] [WITH FAST,
ALL_INDEXES, TABLERESULTS [,ALL_LEVELS]])
99. DBCC showdbaffinity
100. DBCC showfilestats [(file_num)]
101. DBCC showoffrules
102. DBCC showonrules
103. DBCC showtableaffinity (table)
104. DBCC showtext (‘dbname’, {textpointer | {fileid, pageid, slotid [,option]}})
105. DBCC showweights
106. DBCC shrinkdatabase ({dbid | ‘dbname’}, [freespace_percentage [, {NOTRUNCATE |
TRUNCATEONLY}]])
107. DBCC shrinkdb is no longer supported. Please use shrinkdatabase instead
108. DBCC shrinkfile ({fileid | ‘filename’}, [compress_size [, {NOTRUNCATE |
TRUNCATEONLY | EMPTYFILE}]])
109. DBCC sqlmgrstats
110. DBCC sqlperf (LOGSPACE)({IOSTATS | LRUSTATS | NETSTATS | RASTATS [, CLEAR]} |
{THREADS} | {LOGSPACE})
111. DBCC stackdump [( {uid[, spid[, ecid]} | {threadId, ‘THREADID’}] )]
112. DBCC tab ( dbid, objid )
113. DBCC tape_control {‘query’ | ‘release’}[,('\\.\tape')]
114. DBCC tec [( uid[, spid[, ecid]] )]
115. DBCC textall [({'database_name'|database_id}[, 'FULL' | FAST] )]
116. DBCC textalloc ({‘table_name’|table_id}[, 'FULL' | FAST])
117. DBCC thaw_io (db)
118. DBCC traceoff [( tracenum [, tracenum ... ] )]
119. DBCC traceon [( tracenum [, tracenum ... ] )]
120. DBCC tracestatus (trace# [, ...trace#])
121. DBCC unpintable (dbid, table_id)
122. DBCC updateusage ({‘database_name’| 0} [, 'table_name' [, index_id]]) [WITH
[NO_INFOMSGS] [,] COUNT_ROWS]
123. DBCC upgradedb (db)
124. DBCC usagegovernor (command, value)
125. DBCC useplan [(number_of_plan)]
126. DBCC useroptions
127. DBCC wakeup (spid)
128. DBCC writepage ({ dbid, ‘dbname’ }, fileid, pageid, offset, length, data)

No comments:

Post a Comment