Introducing SQL Internals Viewer
SQL Internals Viewer is a tool for looking into the SQL Server storage engine and seeing how data is physically allocated, organised and stored.
All sorts of tasks performed by a DBA or developer can benefit greatly from knowledge of what the storage engine is doing and how it works. This tool has been designed to make database internals more accessible.
The Quick Start section gives a guide on how to use SQL Internals Viewer.
The Resources section lists articles and books with information on SQL Server internals.
2nd May - Update: 1.0.1 has now been released.Features
SQL Internals Viewer displays the main pages used for tracking and allocating space, the GAM and SGAM.
The two pages used for tracking changes made since the last backup, the BCM and DCM, can also be displayed on top of the GAM and SGAM.-
- Database allocation map displaying extent allocation from the GAM and SGAM pages
IAM (Index Allocation Map) pages are displayed by selecting a table or index from the Database Browser.
IAM pages track allocation for individual objects.
-
- Allocation Map showing IAM selected in the Database Browser
The ‘Show all Allocation Units’ feature displays a full visualisation of all allocations.
Hovering over a page will show what it is allocated to.
Clicking on a page will open it in the Page Viewer.
-
- Allocation Map displaying all database objects
Page Viewer
The Page Viewer displays:
- Header information
- Data dump
- Offset table
- Row interpretation
-
- Page Viewer displaying header information and a colourised record in the hex-dump
Individual rows are colourised on the hex dump to show the various elements that make up a row, including the internal structure and data values.
-
- Page Viewer displaying record information
SQL Editor
Queries can be run against a database inside SQL Internals Viewer.
Once a query has run the allocation map will update automatically to show what has changed.-
- SQL Editor