04 May,2013 by Jack Vamvas
I needed to establish the amount of processors available to a SQL Server. A SQL Server scheduler is mapped to a single logical processor, so using this query you can establish the amount of processors. Any scheduler_id < 255 is a scheduler.
It gets lightly more complicated if hyperthreading is enabled. . Find out from the server administrator , use a product such as the coreinfo or this Powershell script - Number of physical processors with Powershell – number of cores to establish if hyperthreading is turned on.
If hyperthreading is enabled – this equates to double the schedulers.
SELECT * FROM sys.dm_os_schedulers WHERE scheduler_id < 255;