March 24, 2011 at 8:07 am
This I/O basics link, provided by Gail Shaw, gives this information on Page Numbers:
Page Number
A page number is a value from 0 through ((Max File Size/8 KB)-1). The page number multiplied by 8 KB provides the offset in the file to the first byte in the page.When a page is read from disk, the page number is immediately checked to ensure that the proper offset was returned (the page number in the header is compared to the expected page number). If this is not the case, SQL Server will generate Error 823.
I'm a little confused on the value part of this paragraph. What is Max File Size? Is it referencing the actual data / log file in SQL server?
March 24, 2011 at 8:38 am
http://msdn.microsoft.com/en-us/library/ms143432.aspx
The following table specifies the maximum sizes and numbers of various objects defined in SQL Server databases or referenced in Transact-SQL statements.
<snip lots>
File size (data): 16 terabytes
So 16 TB = 17,179,869,184 kB. Divide that by 8 and subtract 1 and we get 2147483647 (max 4-byte signed int). Hence the page number is a number between 0 and 2147483647 (though will never really be that number unless you truly do have a 16 TB database with only 1 file)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 24, 2011 at 12:28 pm
Thanks, Gail. That helps.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply