tags:

views:

39

answers:

2

Hi, Every page in an mdf file(sql server) has a m_tornBits field in the page header. Can anybody explain what this value means

here is an example of a page header : -

PAGE HEADER:


Page @0x1A198000

m_pageId = (1:135)        m_headerVersion = 1       m_type = 1
m_typeFlagBits = 0x0      m_level = 0               m_flagBits = 0x2
m_objId = 3               m_indexId = 0             m_prevPage = (1:89)
m_nextPage = (0:0)        pminlen = 46              m_slotCnt = 80
m_freeCnt = 2360          m_freeData = 7036         m_reservedCnt = 0
m_lsn = (8:213:7)         m_xactReserved = 0        m_xdesId = (0:834)
m_ghostRecCnt = 0         m_tornBits = 822083793 

here the tornbit field is 822083793

what does this mean?

A: 

From Technet: SQL Server 2000 I/O Basics

Torn I/O Torn I/O is often referred to as a torn page in SQL Server documentation. A torn I/O occurs when a partial write takes place, leaving the data in an invalid state. SQL Server 2000/7.0 data pages are 8 KB in size. A torn data page for SQL Server occurs when only a portion of the 8 KB is correctly written to or retrieved from stable media.

m_tornBits contains the TORN or CHECKSUM validation value(s).

When the page is read from disk and PAGE_VERIFY protection is enabled for the database, the torn bits are audited.

You can find your answer here in this document (search for m_tornBits):

http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/SQLIOBasicsCh2.doc

Aseem Gautam
thanks for that very useful information.Could you also tell me how to interpret m_flagBits.Thanks,Jude
jude
A: 

Additionally the link might be worth reading: http://www.sqlskills.com/blogs/paul/post/Inside-the-Storage-Engine-Anatomy-of-a-page.aspx

Frank Kalis