SQL Script to get Server Hardware information

Leave a comment (0) Go to comments

At times, DBA need to know,

  • How many physical CPU has been installed
  • How many Logical CPU (Cores) are running
  • What is physical memory installed on the system

This information ideally should in Inventory sheet or should be provided by System support executive but at times these resources are not available on the support, and we need to get these details for SQL Box.

In this case we, use the following SQL Script which give us all these information

/*-------------------------------------------------------------------------------------------------------------------------------Description    :     This stored procedure will send out alert email if there is a blocking which lasted more than specified duration)
-- Copyright 2011 - DBATAG

-- Author        :    DBATAG
-- Created on    :    01/09/2011
-- Version       :    1.0
-- Dependencies  :

SELECT cpu_count AS [Logical CPU Count], hyperthread_ratio AS [Hyperthread Ratio],
cpu_count/hyperthread_ratio AS [Physical CPU Count], 
physical_memory_in_bytes/1048576 AS [Physical Memory (MB)]
FROM sys.dm_os_sys_info OPTION (RECOMPILE);

OUTPUT Screenshot

SQL Script to get Server Hardware information SQL Script to get CPU details

EOF - SQL Script to get Server Hardware information, SQL Server 2012 , 2008 R2 , 2008 , 2005 , 2000

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.