关于MSSQL数据存储的问题
create table test1
(
?tID INT NULL,
?TName char(5)
)
插入一條數(shù)據(jù)后對(duì)該表進(jìn)行觀察,結(jié)果如下:
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 執(zhí)行完畢。如果 DBCC 輸出了錯(cuò)誤信息,請(qǐng)與系統(tǒng)管理員聯(lián)系。
*/
-- 分析
-- Metadata: ObjectId = 34099162 (表:test1)
-- m_slotCnt = 1(表示只有1條數(shù)據(jù))? m_freeCnt = 8078(可用空間)???m_freeData = 112(已使用空間,偏移量)
-- m_freeData = 112=96(頁(yè)頭)+16
-- 那么,16= 4(int)+5(char)+ ?(此處的7為什么數(shù)據(jù)?)
轉(zhuǎn)載于:https://www.cnblogs.com/lc8023/archive/2008/11/12/1332315.html
總結(jié)
以上是生活随笔為你收集整理的关于MSSQL数据存储的问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决后退,清空验证码(其它文本框保留)
- 下一篇: SQL优化查询