top of page

SQL Server Licensing: Core based and CALs

This week I got a phone call from a customer who asked me to come and take a look at their SQL Server. They had a CPU performance issue with one of their servers.

The server is SQL Server 2012 Enterprise edition.

One of the checks that I did was to check how many CPUs the server has, and how many CPUs the SQL Server is configured to work with.

I run this script -

The output -

SQL Server detected 2 sockets with 12 cores per socket and 12 logical processors per socket, 24 total logical processors; using 20 logical processors based on SQL Server licensing. This is an informational message; no user action is required.

What can be understood from the output?

There is a great article from Glenn Berry (B|T) that can describe this probably better than myself.

TL;DR, I will summarize for you-

Socket: It is the actual spot on which processor is fixed on the motherboard.

Core: It is the division of the actual processor on a hardware level.

Logical processor: It is the division of a physical core by using hyper-thread or other techniques.

The message describes that SQL Server is using only 20 logical CPU instead of 24. This problem was relevant to the licensing that this customer had.

You can read more about this issue here and here.

The customer has an enterprise license on the server.

There is 2 type of enterprise license:

  1. Core Based – You pay per each logical processor that you are using.

  2. The max processor that the SQL Server can use is the OS max.

  3. Client Access Licenses(CAL) – Which basically mean that every User or Device Needs a CAL

  4. The max processor that the SQL Server can use is 20. Because of the license limit.

There are 2 additional scripts that I used to identify the issue.

The first script is to check the state of the logical processors -

USE master

go

select cpu_count / hyperthread_ratio as [Sockets],

cpu_count as [Logical CPUs]

from sys.dm_os_sys_info

select count(*) as [Logical CPUs configured online]

from sys.dm_os_schedulers

where status = 'VISIBLE ONLINE'

select count(*) as [Logical CPUs configured offline]

from sys.dm_os_schedulers

where status = 'VISIBLE OFFLINE'

The second script is used to identify the version of the server license.

SELECT @@VERSION;

Which in this case returned:

Microsoft SQL Server 2012 - 11.0.5058.60 (X64) Feb May 14 2014 18:34:29 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 9200) (Hypervisor)

As can be seen there is no indication of the licensing used, as will be seen below, this lack of information is actually telling us that the server is using a CAL type license.

After discussions with the customer, to understand what license best fits their needs. We decided to change the license to Core- based.

I entered the new key and ran again the command:

SELECT @@VERSION;

Microsoft SQL Server 2012 - 11.0.5058.60 (X64) Feb May 14 2014 18:34:29 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.1 <X64> (Build 9200) (Hypervisor)

Read more on licensing with SQL Server –

BTW – This is not only true for SQL 2012 but also for newer versions. As was I discovered today when discussing with a friend who has SQL 2016 on their production servers. We found out that he has 32 processors on the server with CAL license and also with SQL 2016 on CAL license only has 20 active processors. – This issue was also fixed.

BTW – This is not only true for SQL 2012 but also for newer versions. As was I discovered today when discussing with a friend who has SQL 2016 on their production servers. We found out that he has 32 processors on the server with CAL license and also with SQL 2016 on CAL license only has 20 active processors. – This issue was also fixed.

Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page