I am trying to understand the structure of the Sql Server data pages. This is the screenshot from the Pro SQL Server Internals by Dmitri Korotkevitch
I've created 3 tables:
All columns are NOT NULL
Then I run
dbcc traceon(3604);
dbcc page
(
'DbName'
,1 /*File ID*/
,368 /*Page ID*/
,3 /*Output mode: 3 - display page header and row details */
);
and getting following values for Fdata length:
Here I've listed "value in the output" = "swapped value" = "decimal value"
EDITED: So far as I understand it is Const_4 + Nbr_of_Columns * Size_Of_Columns. What is this Const_4?
"Fdata length" in the picture is the offset where the fixed-length data part of the row ends.
In your example the data occupie 4, 8 and 16 bytes, and the row starts with another 4 bytes (1+1+2: status bits A, status bits B, Flength), so the "end" (offset) of storing fixed length data is 8, 12 and 20 respectively.