How can I tell how many Cores SQL Server is actually using? I have two servers running SQL Server.


Server 1: SQL Server 2008 R2 Express (4 core)
Server 2: SQL Server 2012 Developer Edition (8 core)


As far as I am aware SQL Server 2008 R2 Express should only use one core.

SQL Server 2012 Developer version should use all 8 cores.

However if I run the following command inside of SQL query on SQL Server 2008 R2 Express it's showing 4 cores.

select scheduler_id, cpu_id, status, is_online 
from sys.dm_os_schedulers 
where status = 'VISIBLE ONLINE'


Am I using the right command to gauge the usage?
Express edition is limited by 1 processor, not 1 core:


  SQL Server supports the specified number of processor sockets
  multiplied by the number of logical CPUs in each socket. For example,
  the following is considered a single processor for purposes of this
  table: A single-core, hyper-threaded processor with 2 logical CPUs per
  socket. A dual-core processor with 2 logical CPUs. A quad-core
  processor with 4 logical CPUs. SQL Server is licensed per processor
  socket, and not per logical CPU basis.


http://msdn.microsoft.com/en-us/library/ms143760(v=sql.105).aspx

And yes, sys.dm_os_schedulers can be used to ensure, that all 4 cores are mapped with schedulers.