Tuesday, December 22, 2020

DBCC Page and DBCC IND

The tools DBCC Page and DBCC IND are undocumented.


People smarter than me about these tools have written a ton about this. For example:

https://www.sqlskills.com/blogs/paul/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back/


General syntax:

DBCC IND (‘DBName’ or DBID, ‘TableName’ or ObjectId, NOn Clustred Index ID)

and

DBCC PAGE ( {‘dbname’ | dbid}, filenum, pagenum [, printopt={0|1|2|3} ])


So, using the Enron database, we would have something like this:

DBCC IND ('Enron', 'message', 1);

GO

DBCC TRACEON (3604);

GO

DBCC PAGE (Enron, 1, 320, 3);

GO

DBCC TRACEOFF (3604);

GO

No comments:

Post a Comment