SQL Server 2008 Diagnostic Information Queries (June 2012)

Here is the latest version of my SQL Server 2008 Diagnostic Information Queries, with some minor tweaks and improvements, including query numbering and one new query at the end. To go with it is an updated, blank 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.

These queries will work on both SQL Server 2008 and SQL Server 2008 R2 (although some of them will only work on SQL Server 2008 R2 SP1 or later). This is indicated in the instructions for each query. Updated versions for SQL Server 2005 and SQL Server 2012 will be available in the next day or so.  As always, let me know what you think of these queries.

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

13 Responses to SQL Server 2008 Diagnostic Information Queries (June 2012)

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

  2. Matt Crownover says:

    the link for the spreadsheet is the same as the link for the SQL query.

  3. Scott D Jacobson says:

    The link to the spreadsheet is the same as the link to the T-SQL script.

  4. Do these queries run against SQL Server 2008 SP3. I ran them today as a sysadmin user and a number of the DMVs were not available

    • Glenn Berry says:

      A number of them only work with SQL server 2008 R2 SP1 or later. I believe they are all called out in the instructions.

      • Thanks for the quick response: teach me not to read the instructions in detail. I really appreciate the work that has gone into these: they are a real boon as I have just moved to a new DBA post and they will allow me to get up to speed with the challenges ahead much faster.

  5. Pingback: SQL Server 2005 Diagnostic Information Queries (June 2012) | Glenn Berry's SQL Server Performance

  6. dkstanger says:

    This is great! I might consider using this to inventory my database servers. I’ll probably use Reporting Services instead of Excel.

  7. Pingback: Something for the Weekend - SQL Server Links 15/06/12

  8. Jim Drewe says:

    The diagnostic information was GR8! The one thing that I was also looking for was a way to get the CPU serial number using something like xp_instance_regread. I can get it from PowerShell using the cmdlet , but I was hoping for something I could run as a query. Any suggestions? Thx.

  9. Reiner says:

    Hi Glenn,

    I’m guessing that Query 34 should be marked as being SQL 2008 R2 SP1 only, since these columns get the red squiggly on my SQL2008 instance.
    qs.total_rows,
    qs.last_rows,
    qs.min_rows,
    qs.max_rows

    Thanks,
    Reiner

  10. Glenn Berry says:

    Thanks, Reiner. I have added a comment about that in the script. Thanks for pointing it out!

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 )

Google+ photo

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

Connecting to %s