SQL Server Diagnostic Information Queries for July 2014

I revised several of the queries this month in all five versions of the script. There are also two new queries for SQL Server 2014, and one new query in the SQL Server 2008 through SQL Server 2012 versions of the script.

Rather than having a separate blog post for each version, I have just put the links for all five major versions in this single post. There are two separate links for each version. The first one on the top left is the actual query script, and the one below on the right is the matching blank results spreadsheet.  

SQL Server 2005 Diagnostic Information Queries

SQL Server 2005 Blank Results

SQL Server 2008 Diagnostic Information Queries

SQL Server 2008 Blank Results

SQL Server 2008 R2 Diagnostic Information Queries

SQL Server 2008 R2 Blank Results

SQL Server 2012 Diagnostic Information Queries

SQL Server 2012 Blank Results

SQL Server 2014 Diagnostic Information Queries

SQL Server 2014 Blank Results

The basic idea is that you should run each query in the set, one at a time (after reading the directions). You need to click on the top left square of the results grid in SSMS to select all of the results, and then right-click and select “Copy with Headers” to copy all of the results, including the column headers to the Windows clipboard. Then you paste the results into the matching tab in the blank results spreadsheet. There are also some comments on how to interpret the results after each query.

About half of the queries are instance specific and about half are database specific, so you will want to make sure you are connected to a database that you are concerned about instead of the master system database.

Note: These queries are stored on Dropbox. I occasionally get reports that the links to the queries and blank results spreadsheets do not work, which is most likely because Dropbox is blocked wherever people are trying to connect.

I also occasionally get reports that some of the queries simply don’t work. This usually turns out to be an issue where people have some of their user databases in 80 compatibility mode, which breaks many DMV queries.

It is also very important that you are running the correct version of the script that matches the major version of SQL Server that you are running. There is an initial query in each script that tries to confirm that you are using the correct version of the script for your version of SQL Server.

If you want to understand how to better run and interpret these queries, you should consider listening to my latest Pluralsight course, which is SQL Server 2014 DMV Diagnostic Queries – Part 1. This course is short and to the point (only 67 minutes), and I think you will enjoy it!

Please let me know what you think of these queries, and whether you have any suggestions for improvements. Thanks!

3 thoughts on “SQL Server Diagnostic Information Queries for July 2014

  1. Good Post Glenn,

    I have one question about Microsoft’s current patching directories that are created (C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap) during the update. Specifically the patch directories created in Log & Update Cache. Most Microsoft posts say that any of the Log directories can be deleted as needed, but that you should never delete any directory under the Update Cache Directory.

    I can fully understand the need for these directories in the event you need to back out a patch set when you encounter problems, but since these directories are quiet large do you think that it would be safe to delete all the directories prior to the current Service Pack?


  2. Hi Glenn,

    As usual great work. In the future do you envision that you might add a deadlocks query or more importantly aggregated blocking script?


  3. Hi Glenn.

    Just watched your PluralSight dmv course – and even signed up to the service! Great stuff.

    When are you going to post part 2 and 3 ?

    Looking forward to it.


Leave a Reply

Your email address will not be published. Required fields are marked *

Other articles

Imagine feeling confident enough to handle whatever your database throws at you.

With training and consulting from SQLskills, you’ll be able to solve big problems, elevate your team’s capacity, and take control of your data career.