Undocumented DBCC commands
Here you can find some useful undocumented DBCC commands.1. DBCC BUFFER
This command can be used to display buffer headers and pages from the buffer cache.Syntax:
dbcc buffer ([dbid|dbname] [,objid|objname] [,nbufs], [printopt])
where |
DBCC TRACEON (3604) |
2. DBCC BYTES
This command can be used to dump out bytes from a specific address.Syntax:
dbcc bytes ( startaddress, length )
where |
DBCC TRACEON (3604) |
3. DBCC DBINFO
Displays DBINFO structure for the specified database.Syntax:
DBCC DBINFO [( dbname )]
where |
DBCC TRACEON (3604) |
4. DBCC DBTABLE
This command displays the contents of the DBTABLE structure.Syntax:
DBCC DBTABLE ({dbid|dbname})
where |
DBCC TRACEON (3604) |
Look at here for more details:
FIX: Database Usage Count Does Not Return to Zero
5. DBCC DES
Prints the contents of the specified DES (descriptor).Syntax:
dbcc des [( [dbid|dbname] [,objid|objname] )]
where |
DBCC TRACEON (3604) |
6. DBCC HELP
DBCC HELP returns syntax information for the specified DBCC statement. In comparison with DBCC HELP command in version 6.5, it returns syntax information only for the documented DBCC commands.Syntax:
DBCC HELP ('dbcc_statement' | @dbcc_statement_var | '?')
This is the example:
DBCC TRACEON (3604) |
7. DBCC IND
Shows all pages in use by indexes of the specified table.Syntax:
dbcc ind( dbid|dbname, objid|objname, printopt = {-2|-1|0|1|2|3} )
where |
This is the example:
DBCC TRACEON (3604) |
8. DBCC log
This command is used to view the transaction log for the specified database.Syntax:
DBCC log ( {dbid|dbname}, [, type={-1|0|1|2|3|4}] )
PARAMETERS: |
DBCC log (master)
9. DBCC PAGE
You can use this command to view the data page structure.Syntax:
DBCC PAGE ({dbid|dbname}, pagenum [,print option] [,cache] [,logical])
PARAMETERS: |
DBCC TRACEON (3604) |
Data page structure in MS SQL 6.5
10. DBCC procbuf
This command displays procedure buffer headers and stored procedure headers from the procedure cache.Syntax:
DBCC procbuf( [dbid|dbname], [objid|objname], [nbufs], [printopt = {0|1}] )
where |
DBCC TRACEON (3604) |
11. DBCC prtipage
This command prints the page number pointed to by each row on the specified index page.Syntax:
DBCC prtipage( dbid, objid, indexid, indexpage )
where |
DBCC TRACEON (3604) |
12. DBCC pss
This command shows info about processes currently connected to the server.Syntax:
DBCC pss( suid, spid, printopt = { 1 | 0 } )
where |
DBCC TRACEON (3604) |
13. DBCC resource
This command shows the server's level RESOURCE, PERFMON and DS_CONFIG information. RESOURCE shows addresses of various data structures used by the server. PERFMON structure contains master..spt_monitor field info. DS_CONFIG structure contains master..syscurconfigs field information.Syntax:
DBCC resource
This is the example:
DBCC TRACEON (3604) |
14. DBCC TAB
You can use the following undocumented command to view the data pages structure (in comparison with DBCC PAGE, this command will return information about all data pages for viewed table, not only for particular number).Syntax:
DBCC tab (dbid, objid)
where |
DBCC TRACEON (3604) |
No comments:
Post a Comment