Just ahead of presenting it at SQL Saturday in my home town of Minneapolis / Saint Paul, I’m happy to release an updated version of the SQL Server File Layout Viewer. This is a utility I released back in March for inspecting the arrangement of data pages in SQL Server files.
If you will be in Minneapolis this Saturday (space permitting), please come out and see this tool in action!
Based on feedback from others in the SQL Server community, I made these enhancements:
- Page types now provide descriptive labels.
- There’s a new ‘magnifier.’ Click on any page in the analysis image and the surrounding area is enlarged to make details easier to see.
- Two new display options will highlight fragmentation using a red band, and show the amount of free space on pages both graphically and with a readout.
- Right-click in the analysis image to run DBCC PAGE from a context menu.
The utility has been tested with simple demo databases on SQL Server 2005 - 2012, from Windows 7 and 8 clients. It is not compatible with SQL Server 2000, or databases in 2000 compatibility mode. It requires sysadmin rights on the target SQL Server. As always, a reminder: please do not run this tool on a production database, as it will scan the entire thing and may cause performance problems for your server. Scanning a huge database probably will yield unpredictable results.
In the download package you will find an executable file and a Visual Studio 2010 Express Edition solution with all the source code. If you are only interested in running the utility, just run the .exe at the top level of the package. If you are interested in the source code, the complete project is there for your use.
This is free software. You may download and use it as you see fit, but without warranty of any kind. You are welcome to read or modify the source code if you like, but the code is bound to the included GPL (GNU General Public License) and you may not patent or sell it.