
SQL Server Diagnostic Queries
Here are links to the latest versions of these diagnostic queries for Azure SQL Managed Instance, Azure SQL Database, SQL Server 2022, SQL Server 2019, SQL Server 2017, SQL Server 2016 SP2, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005.
All of the SQL Server Diagnostic queries will also work on IaaS virtual machines and Azure ARC.
There are two separate links for each version of the queries. The first one on the top left is the actual diagnostic query script, and the one below on the right is the matching blank diagnostic results spreadsheet, with labeled tabs that correspond to each query in the set.
Azure Diagnostic Queries
- SQL Managed Instance Diagnostic Information Queries
- Azure SQL Database Diagnostic Information Queries
SQL Server Diagnostic Queries
- SQL Server 2022 Diagnostic Information Queries
- SQL Server 2019 Diagnostic Information Queries
- SQL Server 2017 Diagnostic Information Queries
Legacy SQL Server Diagnostic Queries
- SQL Server 2016 SP2 Diagnostic Information Queries
- SQL Server 2016 Diagnostic Information Queries
- SQL Server 2014 Diagnostic Information Queries
- SQL Server 2012 Diagnostic Information Queries
- SQL Server 2008 R2 Diagnostic Information Queries
- SQL Server 2008 Diagnostic Information Queries
- SQL Server 2005 Diagnostic Information Queries
I have a series of YouTube videos that explain how to interpret the results of these queries in more detail. Here is the first in the series.
Jupyter Notebooks
These are links to Jupyter Notebook versions of my Diagnostic Information Queries. These have additional information and formatting compared to automatically generated versions.
