SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

April Version of SQL Server 2008 Diagnostic Queries

I have added two new queries to this month’s version, to try to collect some more hardware information about the database server. I specifically wanted to find out more information about the processor type from T-SQL, since many DBAs don’t have direct access to their database server to run a tool like CPU-Z.

Here are the two new queries:

-- Get System Manufacturer and model number from
-- SQL Server Error log. This query might take a few seconds
-- if you have not recycled your error log recently
EXEC xp_readerrorlog 0,1,"Manufacturer"; 

-- Get processor description from Windows Registry
EXEC xp_instance_regread

If we had a processor description column in the sys.dm_os_sys_info DMV, it would be a lot easier to collect this type of information. I have filed a Connect item to get this added to SQL Server Denali. If you agree that this is important, please vote it up!

Just click on the link to get the full SQL Server 2008 Diagnostic Information Query (Apr 2011), and the matching version of the results spreadsheet.

As always, you will need VIEW SERVER STATE permission to run many of these queries. You should run each query one at a time (after reading my notes for each one), rather than running the entire batch. That way, you can study the results, and see how long each query takes to complete in your environment.


Posted by Glenn Berry on 11 April 2011

Please note: Due to WordPress, there was a formatting error in the second new query (the one from the script was fine)

Here is what the correct version looks like:

-- Get processor description from Windows Registry

EXEC xp_instance_regread



Posted by manishtrigunayak on 11 April 2011

Thanks sir i was looking for that kind of query.

thank u very much

Leave a Comment

Please register or log in to leave a comment.