posted 10/7/2011 5:10:57 AM by Quick Tip - Views: [1497]
DBCC PAGE is one of many undocumented and unsupported commands in SQL Server. However, it is safe to use it. It is widely used by SQL folks, Microsoft SQL engineers for troubleshooting purposes.
For example;
DBCC PAGE ('AdventureWorks', 1,300,1);
The above command gives the complete hex dump along with slot array information of Page 300 from file 1 of AdventureWorks database. The last parameter is stands for output style and can have 4 possible values (0,1,2,3).
If we change the last parameter to 0, you will only see the page header
DBCC PAGE ('AdventureWorks', 1,300,0);
In order for the DBCC PAGE output to come to console, you need to turn on TRACE FLAG 3604.
DBCC TRACEON (3604)
If you like the tip, do like us on FaceBook at http://www.FaceBook.com/SQLServerGeeks
@SQLServerGeeks
Quick Tip (Member since: 9/30/2011 3:53:08 PM)
View Quick Tip 's profile
Leave a comment