Script of the Day – Find the Cores on a System

Sure, you can get the number of processors fairly easily ffrom SQL Server. But did you know you can also get the number of actual cores as well? This little gem works with SQL Server 2005:

SELECT  cpu_count/hyperthread_ratio AS sockets

FROM sys.dm_os_sys_info;


Skip to main content