Tag Archives: SQL Server CPU

Script to get the CPU and Memory Information

You can execute the below script to get the processor and memory information.

-- Scritp to get Processor Info from Registry
EXEC xp_instance_regread

-- Script to get CPU and Memory Info
 cpu_count AS [Number of Logical CPU]
,cpu_count/hyperthread_ratio AS [Number of Physical CPU]
,physical_memory_in_bytes/1048576 AS [Total Physical Memory IN MB]
FROM sys.dm_os_sys_info OPTION (RECOMPILE);