Some Useful Undocumented SQL Server 6.5 DBCC Commands

DBCC PGLINKAGE

This command can be used to display the page chain, performing integrity checks during the traversal.

Syntax:

DBCC pglinkage(dbid,start,number,printopt={0|1|2},target,order={1|0})

where:

dbid – database ID

start – page number with which to start

number – number of pages to examine, or 0 if target is specified

printopt – print option

0 – display only the count of pages scanned

1 – display information about the last 16 pages scanned

2 – display all page numbers in the scan

target – the particular page we are looking for

order – traversal order

(0 descending, 1 ascending)

Example:

DBCC TRACEON (3604)
DBCC PGLINKAGE(6,26,0,1,0,1)

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:

dbid|dbname – database id or the database name

objid|objname – object id or the object name

nbufs – number of buffers to print

printopt – print option

(0 – print out only the proc buff and proc header (default),  1 – print out proc buff, proc header, and contents of buffer)

This is an example:

DBCC TRACEON (3604)
DBCC procbuf(master,’sp_help’,1,0)

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:

dbid – database ID

objid – object ID

indexid – index ID

indexpage – the logical page number of the index page to dump

This is an example:

DBCC TRACEON (3604)
DECLARE @dbid int, @objectid int
SELECT @dbid = DB_ID(‘master’)
SELECT @objectid = object_id(‘sysobjects’) 
DBCC prtipage(@dbid,@objectid,1,0)

DBCC PSS

This command shows info about processes currently connected to the server.

Syntax:

DBCC pss(suid, spid, printopt = { 1 | 0 })

where:

suid – server user ID

spid – server process ID

printopt – print option (0 standard output, 1 all open DES’s and current sequence tree)

This is an example:

DBCC TRACEON (3604)
DBCC pss

Continues…

Pages: 1 2 3 4 5 6




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 |