Sunday, June 28, 2009

Storage Internal (6) Other Pages

The page 4 and 5 that following the first SGAM page, are not used. Page 6 is Differential Changed Map page; page type is 16. It is a bit map that indicates that which extents have been changed since last full backup. Some extents are always marked changed even after a full back, for instance the extent at page 0. The interval of DCM is same as GAM and SGAM. The page address of DCM is always the 7th page from the page of the extent the GAM located. For instance, the first DCM is page 6 which is the 7th page; the second DCM page is page 512232 + 7 - 1 = page 512238 and the third DCM is page 1024464 + 7 -1 = page 1022470. The page after DCM is Bulk Change Map. BCM is a bit map as DCM; it tracks extents which have been changed by a bulk-logged operation since last log backup. BCM interval is same as DCM interval. It's always the 8th page from the first page of the extent where the GAM extent located. For the extents, as long as it's not the first extent in the file, when it includes a GAM page, it will only have 4 or less than 4 pages left for data. If those 4 pages are allocated to one object, this extent will be a uniform extent.

Now let's show page 9 in the first file of the database. It is boot page and always page 9 in the first file of the database.

dbcc traceon(3604)
dbcc page ('test', 1, 9 , 3)
go
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

PAGE: (1:9)


BUFFER:


BUF @0x0000000080FD6700

bpage = 0x0000000080A8E000 bhash = 0x0000000000000000 bpageno = (1:9)
bdbid = 9 breferences = 0 bUse1 = 23847
bstat = 0x1c00009 blog = 0x3215989 bnext = 0x0000000000000000

PAGE HEADER:


Page @0x0000000080A8E000

m_pageId = (1:9) m_headerVersion = 1 m_type = 13
m_typeFlagBits = 0x0 m_level = 0 m_flagBits = 0x0
m_objId (AllocUnitId.idObj) = 99 m_indexId (AllocUnitId.idInd) = 0 Metadata: AllocUnitId = 6488064
Metadata: PartitionId = 0 Metadata: IndexId = 0 Metadata: ObjectId = 99
m_prevPage = (0:0) m_nextPage = (0:0) pminlen = 0
m_slotCnt = 1 m_freeCnt = 6650 m_freeData = 1540
m_reservedCnt = 0 m_lsn = (35:1040:2) m_xactReserved = 0
m_xdesId = (0:0) m_ghostRecCnt = 0 m_tornBits = 730358968

Allocation Status

GAM (1:2) = ALLOCATED SGAM (1:3) = NOT ALLOCATED
PFS (1:1) = 0x64 MIXED_EXT ALLOCATED 100_PCT_FULL DIFF (1:6) = CHANGED
ML (1:7) = NOT MIN_LOGGED

Slot 0, Offset 0x60, Length 1444, DumpStyle BYTE

Record Type = PRIMARY_RECORD Record Attributes = Record Size = 1444

Memory Dump @0x000000000C5FC060

....

DBINFO @0x000000000C5FC060

dbi_dbid = 9 dbi_status = 65536 dbi_nextid = 2105058535
dbi_dbname = test dbi_maxDbTimestamp = 2000 dbi_version = 655
dbi_createVersion = 655 dbi_ESVersion = 0
dbi_nextseqnum = 1900-01-01 00:00:00.000 dbi_crdate = 2009-06-22 21:50:14.713
dbi_filegeneration = 0
dbi_checkptLSN

m_fSeqNo = 35 m_blockOffset = 1038 m_slotId = 1
dbi_RebuildLogs = 0 dbi_dbccFlags = 2
dbi_dbccLastKnownGood = 1900-01-01 00:00:00.000
dbi_dbbackupLSN

m_fSeqNo = 35 m_blockOffset = 572 m_slotId = 41

dbi_oldestBackupXactLSN

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
dbi_LastLogBackupTime = 2009-06-22 22:10:12.393
dbi_differentialBaseLSN

m_fSeqNo = 35 m_blockOffset = 980 m_slotId = 37

dbi_createIndexLSN

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0

dbi_versionChangeLSN

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0

dbi_MinSkipLSN

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
dbi_familyGUID = 716f34fe-ba2f-4251-98f9-83525ce8ee55
dbi_recoveryForkNameStack


entry 0

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
m_guid = 716f34fe-ba2f-4251-98f9-83525ce8ee55

entry 1

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
m_guid = 00000000-0000-0000-0000-000000000000
dbi_differentialBaseGuid = 8911ca8f-0ac9-4d43-a0d1-ab1bf38c52a9 dbi_firstSysIndexes = 0001:00000010
dbi_collation = 872468488 dbi_category = 0 dbi_maxLogSpaceUsed = 1993728
dbi_localState = 0 dbi_roleSequence = 0
dbi_failoverLsn

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0

dbi_dbmRedoLsn

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0

dbi_dbmOldestXactLsn

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
dbi_dbMirrorId = 00000000-0000-0000-0000-000000000000
dbi_pageUndoLsn

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
dbi_disabledSequence = 0
dbi_dvSplitPoint

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
dbi_CloneCpuCount = 0 dbi_CloneMemorySize = 0
dbi_updSysCatalog = 1900-01-01 00:00:00.000
dbi_LogBackupChainOrigin

m_fSeqNo = 35 m_blockOffset = 572 m_slotId = 41
dbi_dbccLastKnownGood = 1900-01-01 00:00:00.000 dbi_modDate = 2009-06-22 21:50:14.713
dbi_verPriv = 167773760 dbi_svcBrokerGUID = 63e68476-c1c3-44ca-aade-441e8374997e
dbi_svcBrokerOptions = 0 dbi_dbmLogZeroOutstanding = 0 dbi_dbmLastGoodRoleSequence = 0
dbi_dbmRedoQueue = 0 dbi_rmidRegistryValueDeleted = 0 dbi_dbmConnectionTimeout = 0
dbi_fragmentId = 0 dbi_AuIdNext = 1099511627803 dbi_CurrentGeneration = 0

dbi_EncryptionHistory


Scan 0

m_fSeqNo = 35 m_blockOffset = 559 m_slotId = 1
EncryptionScanInfo:ScanId = 1

Scan 1

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
EncryptionScanInfo:ScanId = 0

Scan 2

m_fSeqNo = 0 m_blockOffset = 0 m_slotId = 0
EncryptionScanInfo:ScanId = 0


DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Some of information is very obvious, dbi_dbid: Database ID; dbi_status: database status which is the status field in master.dbo.sysdatabase; dbi_dbname: database name; dbi_create: database creation date. dbi_dbccLastKnownGood: the last time DBCC CHECKDB successfully run without any error; dbi_LastLogBackupTime: last log backup time; dbi_firstSysIndexes: the page address of first system table or index. The format is file:page number.

A new page type, type 14, is introduced in SQL Server 2008 instance. It is in master database only, file 1, page 10.

dbcc traceon(3604)
dbcc page ('master', 1, 10 , 3)
go
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

PAGE: (1:10)


BUFFER:


BUF @0x0000000080FAC500

bpage = 0x000000008054A000 bhash = 0x0000000000000000 bpageno = (1:10)
bdbid = 1 breferences = 0 bUse1 = 25901
bstat = 0x1c00009 blog = 0x32159 bnext = 0x0000000000000000

PAGE HEADER:


Page @0x000000008054A000

m_pageId = (1:10) m_headerVersion = 1 m_type = 14
m_typeFlagBits = 0x0 m_level = 0 m_flagBits = 0x200
m_objId (AllocUnitId.idObj) = 99 m_indexId (AllocUnitId.idInd) = 0 Metadata: AllocUnitId = 6488064
Metadata: PartitionId = 0 Metadata: IndexId = 0 Metadata: ObjectId = 99
m_prevPage = (0:0) m_nextPage = (0: 0) pminlen = 0
m_slotCnt = 1 m_freeCnt = 0 m_freeData = 8190
m_reservedCnt = 0 m_lsn = (0:0:1) m_xactReserved = 0
m_xdesId = (0:0) m_ghostRecCnt = 0 m_tornBits = -817539835

Allocation Status

GAM (1:2) = ALLOCATED SGAM (1:3) = NOT ALLOCATED
PFS (1:1) = 0x64 MIXED_EXT ALLOCATED 100_PCT_FULL DIFF (1:6) = CHANGED
ML (1:7) = NOT MIN_LOGGED

Slot 0, Offset 0x60, Length 9, DumpStyle BYTE

Record Type = PRIMARY_RECORD Record Attributes = Record Size = 9

Memory Dump @0x0000000004A4C060

0000000000000000: 00000800 86030000 08†††††††††††††††††....†....

DS_CONFIG @0x0000000004A4C060

cconfsz = 8 cmajor = 8 cminor = 0
crevision = 10 cbootsource = 2 crecinterval = 0
ccatalogupdates = 0 cmbSrvMemMin = 0 cmbSrvMemMax = 2147483647
cusrconnections = 0 cnetworkpcksize = 4096 ckbIndexMem = 0
cfillfactor = 0 ctapreten = 0 cwritestatus = 0
cfgpriorityboost = 0x0 cfgexposeadvparm = 0x0 cfglogintime = 20
cfgpss = 0 cfgpad = 4096 cfgxdes = 16
cfgaffinitymask = 0 cfgaffinitymask64 = 0 cfgIOAffinityMask = 0
cfgIOAffinity64Mask = 0 cfgbuf = 4362 cfgdes = 0
cfglocks = 0 cfgquerytime = 600 cfgcursorthrsh = -1
cfgrmttimeout = 10 cfg_dtc_rpcs = 0 cclkrate = 31250
cfg_max_text_repl_size = 65536 cfgupddate = 39980 cfgupdtime = 23541398
fRemoteAccess = 1 cfgbufminfree = 331 cnestedtriggers = 0x1
cdeflang = 0 cfgTransformNoiseWords = 0x0 cfgPrecomputeRank = 0x0
crossdbownchain = 0 cidCfg = 0x3400d008 cidCfgOld = 0x3400d008
cfgCutoffYear = 2049 cfgLangNeutralFT = 1033 maxworkthreads = 0
minworkthreads = 32 minnetworkthreads = 32 threadtimeout = 15
connectsperthread = 0 cusroptions = 0 exchcostthreshold = 5
maxdop = 0 cpwdpolicyupgrade = 0x1 cfServerTriggerRecursion = 1
cfDisableResultsetsFromTriggers = 0 cfgPHConnectTimeout = 60 CLREnabled = 1
cfgmaxcrawlrange = 4 ftSmallBufMin = 0 ftSmallBufMax = 100
ftLargeBufMin = 0 ftLargeBufMax = 100 RemoteDacEnabled = 0
CommCritComplianceEnabled = 0 EkmEnabled = 0 cUserInstanceTimeout = 0x3c
cfgEnableUserInstances = 0x1 m_BackupCompressionDefault = 0x0 FilestreamAccessLevel = 0
OptimizeForAdhocWorkloads = 0 cchecksum = 902


DBCC execution completed. If DBCC printed error messages, contact your system administrator.

IAM page will be talked in later post.

0 comments: