Category: SQL

Check how many CPU cores SQL can use/see

To see which version of SQL is running:

select @@version

Run this query to see how many CPU’s are online:

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

The output will show many CPU’s SQL is using, most of the time it will equate with the number of CPU’s allocated to the system but if the CPU affinity is defined for SQL server to use particular amount of CPU’s according the licensing model then only active CPU’s will be shown in the output.

If we run the above query without the where clause then it will show how many CPU’s are online and offline/not being used.

The additional rows will show the internally used schedulers such as the schedulers used for the dedicated admin connection.

CPU’s supported by SQL Server Edition:

SQL Server VersionExpress Workgroup Web Standard Enterprise
SQL Server 200512N/A4Unlimited
SQL Server 20081244Unlimited*
SQL Server 201212448
SQL Server 20141N/A44Unlimited**

*Unlimited: Subject to OS Limit
**SQL 2014 Enterprise Edition: Core-based Licensing
Enterprise Edition with Server + Client Access License (CAL) based licensing (not available for new agreements) is limited to a maximum of 20 cores per SQL Server instance. There are no limits under the Core-based Server Licensing model.

How useful was this post?

Click on a star to rate it!

Average rating 4.3 / 5. Vote count: 3

No votes so far! Be the first to rate this post.