SQL Server Diagnostic Information Queries for January 2014

I spent some time this month to true up the SQL Server 2005 version, with the other versions for the queries that are common between all of these versions, since some small differences had cropped up over time across those versions. I also added the drive-level latency query to the 2005 version.

Rather than having a separate blog post for each version, I’ll just put the links for all five major versions here. 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.

I am considering either doing fewer updates or no updates to the SQL Server 2005 version of these queries in the future, since SQL Server 2005 has been out of mainstream support from Microsoft for nearly three years now. On the other hand, I know that a lot of people are still using SQL Server 2005. What do you think?

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

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.

The idea is that you would 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 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 spreadsheet. There are also some comments on how to interpret the results after each query.

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.

There is an initial query in each version that tries to confirm that you are using the correct version of the script for your version of SQL Server.

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

This entry was posted in Diagnostic Queries, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014 and tagged , . Bookmark the permalink.

3 Responses to SQL Server Diagnostic Information Queries for January 2014

  1. Ranga N says:

    Hi Glen, Thanks a lot for your diagnostic queries….few days back our QA team was complaining about high cpu usage and i just pulled your script and immediately found the culprit with the high cpu utilizing queries!!!

    Also, i have a question. The DMV  sys.dm_exec_query_stats reports all elapsed time and worker time(CPU) in microseconds, but i don’t see queries that divide elapsed time and Worker time columns by 1000 to report as Milliseconds. What is your opinion ? 


    Thanks, Ranga Narasimhan @coolmssqldba – Twitter

  2. Pingback: (SFTW) SQL Server Links 17/01/14 • John Sansom

  3. Pingback: (SFTW) SQL Server Links 17/01/14 - SQL Server - SQL Server - Toad World

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s