SQL Server 2008 R2 Diagnostic Information Queries (Feb 2013)

Here is the February 2013 version of my SQL Server 2008 R2 Diagnostic Information Queries, with some minor tweaks and improvements to several of the existing queries. I have decided to split off this into a separate version just for SQL Server 2008 R2. There are also two new queries that I have added this month. 

To go with it is an updated, blank 2008 R2 results spreadsheet, where the tabs in the spreadsheet are labeled and in the same order as the queries. The idea is that you can run these queries one by one, click on the top left square of the results grid, and then right-click and select “Copy with Headers” to select and copy the results of the query and then paste them into the matching tab of the results spreadsheet.

One new feature in this version is that I have modified the initial comment for these queries to make them work better with Mitch Wheat’s SQLDiagCmd program that is a standalone .NET program to run these queries and automatically capture the results in a nice Excel spreadsheet (which saves you the time and trouble of doing it manually). Mitch also has a version of the program with a UI that is even easier to use…

Many of these queries only work on SQL Server 2008 R2, although some will work on older versions of SQL Server. If you are using an older version of SQL Server, you should use the version of my diagnostic queries for that version of SQL Server.

You should be aware that both Query 47 and Query 51 could take some time to run, depending on the size of your database and the speed of your hardware and storage subsystem.

As always, I welcome any feedback you may have about these queries.

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

6 Responses to SQL Server 2008 R2 Diagnostic Information Queries (Feb 2013)

  1. Dirk Hondong says:

    Thx again for the work. I’ll update my script repository tomorrow morning

  2. Pingback: SQL Server – Diagnostic Information Queries (2005/2008/2012) « Alex Souza

  3. Ranga N says:

    Hi Glenn, If there is a Noble Prize for SQL Leaders, I would propose you…thanks for sharing with the community this great tool. Was using Mitch Wheat program to get the data, works great.   Few Feedbacks: windows Info It would be great if the windows version like 2003, 2008 or 2008R2 is also provided for simplicity.   Thanks, Ranga  


  4. Ann Cao says:

    Thanks Glenn for posting these useful queries.
    Is that possible also to include a query that tells what SQL components installed on the server, for example SSIS, SSRS, SSAS, or database engine.


  5. Pingback: What's in your toolbox? - database dave

  6. Francisco Ramos says:

    Thanks a lot Glenn. Very useful as always 🙂

    I’ve also updated my UI for your queries file with the new format.
    (I developed a while ago a Windows Forms UI for parsing an executing Glenn Berry’s queries, showing the results on a datagrid (thus, orderable) and the comments on a big textbox)

    If anyone wants to try it, you can download the source code here
    or the release here

    The program reads the file called queries.sql on the same folder and parses it. You only have to comment the 2 lines related to switching databases (558 and 559 in current query file). With that, it should take wichever query file that has the new format.

    Kind Regards


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 )

Google photo

You are commenting using your Google 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