Looking online I have found a lot of information describing how pages work, what they are used for, and how they tie into the architecture of MSSQL Server. I understand they are a part of the mdf file created to store the data itself, however what I'd like to know is how are pages stored on disk. Is each page (or extent) itself a file on disk, or is it just data contained a giant mdf file?

Reading this it seems like that latter is true, but it is not completely clear.


Pages in SQL Server are basically logical concept designed to store data and access it.

Quoting from Wikipedia and similar StackOverflow Thread.

Storage space allocated to a database is divided into sequentially numbered pages, each 8 KB in size. A page is the basic unit of I/O for SQL Server operations. A page is marked with a 96-byte header which stores metadata about the page including the page number, page type, free space on the page and the ID of the object that owns it. Page type defines the data contained in the page: data stored in the database, index, allocation map which holds information about how pages are allocated to tables and indexes, change map which holds information about the changes made to other pages since last backup or logging, or contain large data types such as image or text. While page is the basic unit of an I/O operation, space is actually managed in terms of an extent which consists of 8 pages. A database object can either span all 8 pages in an extent ("uniform extent") or share an extent with up to 7 more objects ("mixed extent"). A row in a database table cannot span more than one page, so is limited to 8 KB in size. However, if the data exceeds 8 KB and the row contains varchar or varbinary data, the data in those columns are moved to a new page (or possibly a sequence of pages, called an allocation unit) and replaced with a pointer to the data.[21]

| improve this answer | |
  • Thanks, I guess it is getting very low level to ask how SQL Server allocates and references the 8kb pages on disk? – Rumham Oct 22 '18 at 11:36
  • @Rumham, I think this documentation explains space allocation well. – Dan Guzman Oct 22 '18 at 11:39
  • Nothing is very low, a question is question. I may not be able to describe how actually it stores because that is beyond scope but wiki would give you some idea that would give fair understanding. – Shanky Oct 22 '18 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.