create table test1
(
tID INT NULL,
TName char(5)
)
插入一条数据后对该表进行观察,结果如下:
PAGE: (1:127)
BUFFER:
BUF @0x02BD8D20
bpage = 0x046D0000 bhash = 0x00000000 bpageno = (1:127)
bdbid = 5 breferences = 0 bUse1 = 26587
bstat = 0xc0000b blog = 0x212121bb bnext = 0x00000000
PAGE HEADER:
Page @0x046D0000
m_pageId = (1:127) m_headerVersion = 1 m_type = 1
m_typeFlagBits = 0x4 m_level = 0 m_flagBits = 0x8000
m_objId (AllocUnitId.idObj) = 122 m_indexId (AllocUnitId.idInd) = 256
Metadata: AllocUnitId = 72057594045923328
Metadata: PartitionId = 72057594040811520 Metadata: IndexId = 0
Metadata: ObjectId = 34099162 m_prevPage = (0:0) m_nextPage = (0:0)
pminlen = 13 m_slotCnt = 1 m_freeCnt = 8078
m_freeData = 112 m_reservedCnt = 0 m_lsn = (46:189:1)
m_xactReserved = 0 m_xdesId = (0:0) m_ghostRecCnt = 0
m_tornBits = 0
Allocation Status
GAM (1:2) = ALLOCATED SGAM (1:3) = ALLOCATED
PFS (1:1) = 0x61 MIXED_EXT ALLOCATED 50_PCT_FULL DIFF (1:6) = CHANGED
ML (1:7) = NOT MIN_LOGGED
DATA:
Slot 0, Offset 0x60, Length 16, DumpStyle BYTE
Record Type = PRIMARY_RECORD Record Attributes = NULL_BITMAP
Memory Dump @0x366AC060
00000000: 10000d00 01000000 61626364 650200fc †........abcde...
OFFSET TABLE:
Row - Offset
0 (0x0) - 96 (0x60)
DBCC 执行完毕。如果 DBCC 输出了错误信息,请与系统管理员联系。
*/
-- 分析
-- Metadata: ObjectId = 34099162 (表:test1)
-- m_slotCnt = 1(表示只有1条数据) m_freeCnt = 8078(可用空间) m_freeData = 112(已使用空间,偏移量)
-- m_freeData = 112=96(页头)+16
-- 那么,16= 4(int)+5(char)+ ?(此处的7为什么数据?)