The Allocation Map shows a graphical representation of the layout of pages and extents in a database file or files.
Connecting to a server
When the Allocation Map is opened the Connect to SQL Server dialog box is show.
To connect the Allocation Map to a different SQL Server instance click the Connect to Server button:
The database displayed in the allocation map can be changed using the Database drop down list.
When a database is first loaded Internals Viewer will scan through the object IAMs to build the allocation map. Progress can be seen on status bar in the bottom left.
Different objects are given different colours.
When the mouse is hovered over a page the status bar will display the page address and object that the page is allocated to in the bottom right hand corner.
Clicking on a page in the Allocation Map will open it in the Page Viewer.
Page Address text box
The page text box is in the top right hand corner of the Allocation Map window. Typing a page address in the format file id: page id and then pressing Enter will open the page in the Page Viewer.
Right clicking on a page address in the page text box will give several options:
- Copy – this will copy the page address to the clipboard
- Copy DDBC command to Clipboard – these options will script the necessary commands to view the page from a query window with DBCC PAGE
A key is displayed at the bottom of the window including the index type, total pages used, and total pages allocated. It can be toggled on and off using the Key toolbar button:
Clicking on an item in the key will highlight the object on the map and dim other objects. Clicking on the same object again will deselect it and show all object on the map.
Toggling the File Details toolbar button will display the file details information at the bottom of the Allocation Map.
File details are sourced from sys.database_files, sys.filegroups, and DBCC showfilestats. Each file displayed in the Allocation Map will have its own File Details information bar.
The buffer pool is SQL Server’s page memory cache. Pages can be dirty, which means they have been changed and not yet been written to disk.
A graphical representation of the pages in the buffer pool can be displayed by toggling the Buffer Pool toolbar button.
If a page is in the buffer pool it is darkened. If the page is dirty is has a red mark in the top left hand corner.
Not in buffer pool/in buffer pool/in buffer pool + dirty
Buffer pool information is sourced from sys.dmos
The buffer pool is read from sys.dmos
buffer_descriptors and mapped to the allocation map on an individual page basis. If a large number of pages are in the buffer pool Internals Viewer may become slow.
The PFS (Page Free Space) is another allocation structure that stores the status of individual pages.
The PFS stores several pieces of information including how much space is free on the page, the allocation status (allocated/unallocated), if the page is an IAM, if the page is part of a mixed extent, and if the page contains Ghost Records.
Clicking PFS on the toolbar will put the Allocation Map into PFS mode.
Hovering over a page will display a description of the PFS value for the page in the status bar in the bottom right hand corner of the application.
The sizes of pages on the Allocation Map are determined by the Page Size drop down.
The dropdown has three options; Small, Medium, and Large. By default when the Allocation Map is in PFS mode the page size is set to Large.