i did a test about DBCC IND and DBCC page . Engine: SQL Server 2008
Script:
CREATE TABLE dbo.t2
(
ID int,
Col1 varchar(10),
Col2 varchar(20)
);
INSERT INTO dbo.t2 SELECT 1,REPLICATE('a',10),REPLICATE('b',10)
DECLARE @DBID int,@TableID int;
SELECT @DBID=DB_ID(),@TableID=OBJECT_ID('dbo.t2');
DBCC IND(@DBID,@TableID,-1)
--this shows : 1 274 1 278 1307151702 0 1 72057594039107584 In-row data 1
DBCC TRACEON (3604)
--DBCC PAGE (@DBID, 1,22,3)
--then dump the page info
DBCC PAGE(@DBID, 1,274,1)
shows:
DATA:
Slot 0, Offset 0x60, Length 51, DumpStyle BYTE
Record Type = PRIMARY_RECORD Record Attributes = NULL_BITMAP VARIABLE_COLUMNS VERSIONING_INFO Record Size = 51 Memory Dump @0x000000000F7EA060
0000000000000000: 70000800 01000000 03000002 001b0025 †p..............% 0000000000000010: 00616161 61616161 61616162 62626262 †.aaaaaaaaaabbbbb 0000000000000020: 62626262 62000000 00000000 00310000 †bbbbb........1.. 0000000000000030: 00000†††††††††††††††††††††††††††††††...
OFFSET TABLE:
Row - Offset 0 (0x0) - 96 (0x60) i try to explain:
byte one 0x70 01110000
BIT 0: SQL SERVER 2005/2008
BIT 1-3 :PRIMARY DATA
BIT 4 : HAS NULL
BIT 5:HAS VAR
BIT 6:NOT USED
BIT 7: NOT GHOST
Second Byte
0x00 : NOT USED
Thrid Byte
0x0008 :offset 8
the fix length int ,i got value 1
then next byte
0300 : 3 columns
00 : not null
0002 :2 columns
var column endoffset 0x001B (i got value aaa....)
var column end offset 0x0025 (i got value bbbb...)
but ,i don's know the meaning about last bytes....
please help me ,thks a lot
It's the 14-byte versioning tag [timestamep, pointer into tempdb].