Data files contain data and objects such as tables, indexes, stored procedures, and views.
Storage space allocated to a database is divided into pages that are contiguously numbered from 0 to N. That means data file is a large array of pages.
When Microsoft SQL Server starts expanding the database file from its default size, the newly created pages are numbered starting from the (last highest page number in the file)+1.
Similarly, when SQL server shrinks the file it removes pages descendingly (starting with the highest page number) from the database file.
Disk I/O operations (read/write) are performed at the page level.
Basically, a SQL Server data file has the following basic structure.
SQL server refer the first page in the data file as page number 0.In all the data file first 9 pages (till page number 8) are in same order as shown below.In the primary data file, the 10th page (Page number 9) will be the boot page which store the metadata about the database.
Storage space allocated to a database is divided into pages that are contiguously numbered from 0 to N. That means data file is a large array of pages.
When Microsoft SQL Server starts expanding the database file from its default size, the newly created pages are numbered starting from the (last highest page number in the file)+1.
Similarly, when SQL server shrinks the file it removes pages descendingly (starting with the highest page number) from the database file.
Disk I/O operations (read/write) are performed at the page level.
Basically, a SQL Server data file has the following basic structure.
SQL server refer the first page in the data file as page number 0.In all the data file first 9 pages (till page number 8) are in same order as shown below.In the primary data file, the 10th page (Page number 9) will be the boot page which store the metadata about the database.