SQL Server stores data in "pages" or allocation units of approximately 8,000 bytes. If you want to see the raw data in a given database page and interpret the information produced, you can dump that data to the console (or to the SQL Server log) using the undocumented DBCC PAGE command.
Here is the command syntax.
DBCC PAGE ({dbid|dbname}, pagenum [,print option] [,cache] [,logical])
dbid|dbname: The name or dbid for the database to be used.
pagenum: The logical or virtual page number to show; 1 is the first.
print option: An optional parameter that controls how the data is formatted.
cache: Optional parameter that indicates how caching is used.
logical: Optional parameter that determines what type of page to retrieve.
DBCC PAGE requires that you set a trace flag before it can return values to the console. To do this, use DBCC TRACEON(3604) before running DBCC PAGE. If you want to s
To continue reading for free, register below or login
To read more you must become a member of SearchSQLServer.com
');
// -->

end the results to the error log instead of the console, use DBCC TRACEON(3605).
Here's an example of the command at work, along with its output. Some of the flags in the output should be self-evident. For instance, if m_tornBits is anything but 1, then the "turn page" flag for that page has been set and the page is probably damaged.
DBCC TRACEON (3604)
DBCC PAGE (master, 1, 1)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
About the author: Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!
More information from SearchSQLServer.com
Learning Center: Get several undocumented stored procedures
Tips: Check out our complete collection of stored procedures
Ask the Experts: Andrew Novick is available to answer your development questions