SQL Server 2012 Diagnostic Information Queries (July 2012)

Here is the latest version of my SQL Server 2012 Diagnostic Information Queries, with some minor tweaks and improvements to a number of the existing queries, and two new queries. To go with it is an updated, blank SQL Server 2012 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.

Most of these queries only work on SQL Server 2012, 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.

The July 2012 version for SQL Server 2005 will be available in the next day or so. As always, let me know what you think of these queries.

About these ads
This entry was posted in SQL Server 2012 and tagged , . Bookmark the permalink.

9 Responses to SQL Server 2012 Diagnostic Information Queries (July 2012)

  1. Calvin Jones says:

    The link to teh results spreadsheet is pointing to the SQL queries.

  2. Calvin Jones says:

    The VLF Counts query errored out with a “Database does not exist” error because we have a database with a ‘-’ in its name. This can be fixed by enclosing the ?’s in brackets [].

    EXEC sp_MSforeachdb N’Use [?];

    INSERT INTO #VLFInfo
    EXEC sp_executesql N”DBCC LOGINFO([?])”;

    INSERT INTO #VLFCountResults
    SELECT DB_NAME(), COUNT(*)
    FROM #VLFInfo;

    TRUNCATE TABLE #VLFInfo;’

  3. Glenn Berry says:

    Ok, the lonk should be fixed now, and the SQL Script is also modified. Thanks for the heads-up!

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

  5. Karl Fasick says:

    Huzzah! Can’t wait to try the Excel bit! Thanks!

  6. Pingback: Top 10 Free SQL Server Tools of 2013 - Work Smarter This Year

  7. Pingback: Ten Free SQL Server Tools that you Need to Know About | sql Hammer

  8. Pingback: Ten Free SQL Server Tools that you Need to Know About - SQL Server Blog - SQL Server - Telligent

  9. Pingback: Kevin Kline : Wait Statistics in Microsoft SQL Server

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