Some Useful Undocumented SQL Server 7.0 and 2000 DBCC Commands

DBCC DES

Prints the contents of the specified DES (descriptor).

Syntax:

dbcc des [([dbid|dbname] [,objid|objname])]

where:

dbid|dbname – database id or the database name
objid|objname – object id or the object name

This is an example:

DBCC TRACEON (3604)
DBCC DES

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 an example:

DBCC TRACEON (3604)
DECLARE @dbcc_stmt sysname
SELECT @dbcc_stmt = ‘CHECKTABLE’
DBCC HELP (@dbcc_stmt)

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:

dbid|dbname – database id or the database name

objid|objname – object id or the object name

printopt – print option

There is change in this command in how it is used in SQL Server 7.0, in that the printopt parameter is now no longer optional.

This is an example:

DBCC TRACEON (3604)
DBCC IND (master, sysobjects, 0)

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}])

where:

dbid or dbname – Enter either the dbid or the name of the database

type – is the type of output, and includes these options:

0 – minimum information (operation, context, transaction id)

1 – more information (plus flags, tags, row length, description)

2 – very detailed information (plus object name, index name, page id, slot id)

3 – full information about each operation

4 – full information about each operation plus hexadecimal dump of the current transaction log’s row.

-1 – full information about each operation plus hexadecimal dump of the current transaction log’s row, plus Checkpoint Begin, DB Version, Max XDESID

by default, type = 0

To view the transaction log for the master database, run the following command:

DBCC log (master)

 

Continues…

Pages: 1 2 3 4




Related Articles :

  • No Related Articles Found

No comments yet... Be the first to leave a reply!

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |