dbcc checkcatalog [( dbname)]
Check consistency of system catalogs tables for database named.
Parameters
ParamDescription
dbname (optional) database name; default is current db
dbcc checkdb [( dbname [, skip_ncindex ] )]
Check consistency of data and index pages.
Parameters
ParamDescription
dbname (optional) database name; default is current db
skip_ncindex (optional) skip check on non clustered indexes for the
database
dbcc checktable ( tabid [, skip_ncindex ] )
Check consistency of data and index pages.
Parameters
ParamDescription
tabid table name or table ID
skip_ncindex (optional) skip check on non clustered indexes for the table.
dbcc chgdbname ( dbname, newname )
Changes database name in DBINFO only.
Parameters
ParamDescription
dbname existing database name
newname new database name
dbcc chgobjname ( objname, newname )
Changes object name in cache only.
Parameters
ParamDescription
objname existing object name
newname new object name
dbcc cursorinfo ( cursor_level, cursor_name )
Displays cursor information.
Parameters
ParamDescription
cursor_level level number; -1 to get cursor info for all nesting levels
cursor_name name of the cursor
dbcc dbinfo [( dbname )]
Print DBINFO structure for specified database.
Parameters
ParamDescription
dbname (optional) database name
dbcc dbrecover ( dbname )
This will have recovery run on a suspect database without rebooting the server.
Parameters
ParamDescription
dbname database name
dbcc dbrepair ( db, option [, table][, index] )
Repair system tables.
Parameters
ParamDescriptionValid Values
db database ID or database name
option repair option dropdb drop the specified database
findstrandeddisplay stranded objects
fixindexrebuild the specified index; used on system catalogs only
fixsysindexcorrect pfreeoff value for sysindexes
newthresholdrebuild the database threshold table
remapupdate the in-core image of the database usage map table
repairindexrepair index for user tables
table (optional) table name
index (optional) index ID
dbcc dbtable ( dbid )
Print out the contents of the DBTABLE structure.
Parameters
ParamDescription
dbid database ID
dbcc delbuff ( dbid, page, dirty_flush, kept_flag, rlock_flag )
Remove buffer from cache, optionally flush to disk.
Parameters
ParamDescription
dbid database ID
page the logical page number of the page to be removed
dirty_flush if 1, then flush the page to disk if DIRTY
kept_flag if 1, then do not unkeep buffer if KEPT
rlock_flag if 1, then do not remove RESOURCE LOCK
dbcc delete_row ( dbid, page, delete_by_row, rownum )
Delete an index or data row by either a row number or an offset on a page.
Parameters
ParamDescriptionValid Values
dbid database ID
page the logical page number
delete_by_row delete location; by row or by offset 1 next parameter is
interpreted as row number
0 next parameter is interpreted as offset on the page
rownum either a row number or offset
dbcc des [( [ dbid ][, objid ] )]
Prints the contents of the specified DES (descriptor).
Parameters
ParamDescription
dbid (optional) database ID
objid (optional) object ID
dbcc descount ( n_chains )
Print up to 10 longest DES chains. P>Parameters
ParamDescription
n_chains the number of chains to print, up to 10.
dbcc desdiag ( dbid, option )
Produce DES diagnostic reports.
Parameters
ParamDescriptionValid Values
dbid database ID
optiondiagnostic to run -4 Display Hash Table Graph
-3 Display Diagnostic Maps
-2 Run all the tests (1-4)
-1 Return to caller - Exit
0 Redisplay this menu
1 Check Free Des Chain
2 Check Dbtable DES chain
3 Check Des Kept/Unkept chain