SQL Server Script to identify logical, physical CPU count for SS2K5 and higher database servers

In this post the focus is on identifying logical and physical cpu count for database servers with SQL Server 2005 and higher versions. The script uses the DMV  sys.dm_os_sys_info which is used to retrieve OS related information in SQL Server. This script was provided by SQL Server MVP Glenn Berry. 


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)], sqlserver_start_time
FROM sys.dm_os_sys_info OPTION (RECOMPILE);

Below is the result set:

Glen berry identify processors

Hope this helps.

Advertisements
This entry was posted in SQL Server DBA Stuff and tagged , , , , , , , , , , . Bookmark the permalink.

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