I made some small improvements to a few of the queries this month. I plan to add several more SQL Server 2014 specific queries over the next couple of months, along with a lot more comments on how to interpret the results of each query in the entire set.
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.
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!
3 Responses to SQL Server Diagnostic Information Queries for April 2014
Thank you Mr. Berry for the complete and updated for SQL2014 Diagnostic Queries! I had a very old copy of these that I had been using so I am taking the new versions for a test spin right now. I certainly appreciate all you do for the SQL Community.
Glad you find them useful. Thanks!
These scripts are really amazing and helpful for us during the migration to get the inventory, but i am looking for a scripts consolidated for all versions which can give me the server information to instances information,
if you have one such scripts could you please direct me,
Appreciate your help. Saves us lots of time.