Virtual Page Numbers

The pages in SQL Server devices are identified by virtual page numbers, just as the pages in databases are identified by logical page numbers. While logical page numbers start at 0 for each database and can be duplicated, virtual page numbers do not start over with each device. Each virtual page number is unique within SQL Server.

Virtual page 0 in SQL Server is always the first page in the master device, which is created as part of the installation process. The virtual page numbers for the master device start at 0 and increment by 1 to the end of the device. If the system was installed with the default 25 MB master device, the starting virtual page number is 0, and the ending page number is 12799 ((25*512)-1) as shown in the following illustration.

The starting virtual page number for all other devices is calculated by multiplying the VDEVNO specified in the previous DISK INIT statement by the number 16777216. This ensures there is no duplication in virtual page numbers between devices. The virtual page numbers for each device start at the number calculated from the VDEVNO and increment by 1 until they meet the limit defined by the DISK INIT SIZE parameter. For example, if the DISK INIT statement specified a VDEVNO of 8 and a SIZE of 2048, the starting virtual page number for that device would be 134217728 (16777216 * 8), and its virtual page numbers would increment by 1 to 134219775 (134217728 + SIZE – 1).