码迷,mamicode.com
首页 > 其他好文 > 详细

Page Header Info

时间:2016-01-16 16:20:45      阅读:349      评论:0      收藏:0      [点我收藏+]

标签:

 使用DBCC Page命令查看Page的context,Page Header各个字段的含义

dbcc traceon(3604)

dbcc page(DBID,TableID,IndexID,PartitionNumber)

Page Header Example

PAGE HEADER:


Page @0x000000024F382000

m_pageId = (1:164)                  m_headerVersion = 1                 m_type = 1
m_typeFlagBits = 0x0                m_level = 0                         m_flagBits = 0x0
m_objId (AllocUnitId.idObj) = 86    m_indexId (AllocUnitId.idInd) = 256 
Metadata: AllocUnitId = 72057594043564032                                
Metadata: PartitionId = 72057594039173120                                Metadata: IndexId = 1
Metadata: ObjectId = 277576027      m_prevPage = (1:163)                m_nextPage = (1:165)
pminlen = 8008                      m_slotCnt = 1                       m_freeCnt = 83
m_freeData = 8107                   m_reservedCnt = 0                   m_lsn = (34:33:14)
m_xactReserved = 0                  m_xdesId = (0:0)                    m_ghostRecCnt = 0
m_tornBits = 0                      DB Frag ID = 1            

 

1,m_pageId = (1:164)

Page所在的File ID 和Page ID

2,m_type = 1

PageType PageType_Desc
1 Data Page
2 Index Page
3 LOB
4 LOB
8 GAM
9 SGAM
10 IAM
11 PFS
13 Boot
15 FileHeader
16 DCM
17 BCM

 3,m_level = 0 

Page 在Index 中所处的Level,m_level=0,表示处于Leaf Level。

对于Heap,m_level=0表示的是Data Page;

对于Clustered index,m_level=0表示的是Data Page;

对于Nonclustered index,m_level=0表示的leaf level node.

4,用于计算AllocUnitId

m_objId (AllocUnitId.idObj) = 86   

m_indexId (AllocUnitId.idInd) = 256

详细信息请参考:Inside the Storage Engine: How are allocation unit IDs calculated?

5, Metadata

Metadata: AllocUnitId = 72057594043564032                               
Metadata: PartitionId = 72057594039173120                               

Metadata: IndexId = 1
Metadata: ObjectId = 277576027

6, page的chain pointer

m_prevPage = (1:163)     --Previous Page (FileID : PageID)          

m_nextPage = (1:165)  --Next Page(FileID:PageID)

7, Other

pminlen = 8008      --定长数据所占的字节数为8008个字节                 

m_slotCnt = 1            --页面中的数据的行数,每页1条记录          

m_freeCnt = 83    --页面中剩余的空间,还剩83字节的空间 
m_freeData = 8107    --页面空闲空间的位置在8107Byte,一个页面8KB等于8192字节             

m_reservedCnt = 0    --活动事务释放的字节数             

m_lsn = (34:33:14)   --Log Sequence No
m_xactReserved = 0  --最新加入到m_reservedCnt field的字节数            

m_xdesId = (0:0)      --添加到m_reservedCnt的最近的事务id            

m_ghostRecCnt = 0   --ghost Record count
m_tornBits = 0          --This holds either the page checksum or the bits that were displaced by the torn-page protection bits –

             depending on what form of page protection is turnde on for the database.           

                 

参考文档:

Inside the Storage Engine: How are allocation unit IDs calculated?

Inside the Storage Engine: Anatomy of a page

笔记17 DBCC IND()非常详细解释加dbcc page([GPOSDB],1,119,3)非常详细解释 2013-1-20

 

Page Header Info

标签:

原文地址:http://www.cnblogs.com/ljhdo/p/5135358.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!