SQL Server 2012 Enterprise Editions

Version 2.0. Please note additional comment in the section: 'How do we change between different releases'

In this blog we want to shed some light into a topic that can develop into some confusion and which at the end might also cause some performance issues with customers running SQL Server 2012 with their SAP Netweaver Applications. In an earlier blog article we were talking about the need of SQL Server Enterprise Edition for SAP Netweaver based applications. The article can be found here: https://blogs.msdn.com/b/saponsqlserver/archive/2009/02/19/frequently-asked-question-why-do-we-need-sql-server-enterprise-edition-for-sap-netweaver-based-applications.aspx

The basic statements about requiring SQL Server Enterprise Editions still hold true and are even more binding than ever before. A bit more than a year ago, SAP and Microsoft decided that the installation of SAP Netweaver products on SQL Server will leverage full Page Compression for every single table and index. A decision which resulted in massive smaller databases and dramatically reduced storage costs. Hence the SAP Data Dictionary, SAP sapinst, R3Load, upgrade tools simply expect to find database compression as feature in the SQL Server Edition used. For SQL Server 2012 there only is Enterprise Edition and Developer Edition (which usually has the full feature set of Enterprise Edition).

With SQL Server 2012, Microsoft also changed the licensing. The reasoning behind this change will not be discussed in this article in detail. More on the changes can be found here:

Out of those changes of licensing a need developed to have two Enterprise Editions:

  • SQL Server EE is no longer being offered under the Server + CAL (Client Access License) licensing model. For customers with Software Assurance on existing SQL EE Server licenses (or access to them under their current Enterprise Agreements during term) a version of Enterprise Edition was created to enable them to upgrade to SQL Server 2012. This version has technical restrictions limiting an instance to using only 20 processor cores (40 CPU threads with Hyperthreading).. Customers must still have the proper version of the CAL and additional physical and virtual use right restrictions of this SKU (Stock Keeping Unit) apply. Please refer to the three documents listed above for additional details.
  • An Enterprise Edition which is licensed per core and which does not have limits on the # of cores usable on a server (within the absolute limits supported). This Enterprise Edition does reflect the new licensing model for SQL Server Enterprise Edition.

This meant that we really need two different Enterprise Edition SKUs which do have different characteristics in scalability. From SAP side, SAP only will distribute the Enterprise Edition which is licensed per core and hence unlimited within the frame of their ISV-R/Reseller contract with Microsoft. This does not mean that SAP will not support the CAL based (and 20-core limited) Enterprise Edition. Since it does have all the Enterprise Edition functionality, it is supported by SAP.

Customers who did not buy SQL Server from SAP need to run the Enterprise Edition SKU of SQL Server 2012 that they are licensed for (Server+CAL or Core). This can lead to SAP customers running the Server+CAL Enterprise Edition SKU. If the restrictions of the SQL Server 2012 Enterprise Edition licensed by Server+CAL are not acceptable, customers should engage with their Microsoft account teams to discuss options or consider purchasing SQL Server Enterprise Edition based on core licenses.

How to identify which SQL Server 2012 Enterprise Edition is used

In order to identify the exact version/SKU of SQL Server, one can check the errorlog of SQL Server. In the first lines of the errorlog, we describe the version and the platform it is running on. This could look like:

2012-05-08 16:04:54.56 Server      Microsoft SQL Server 2012 - 11.0.2100.60 (X64)

             Feb 10 2012 19:39:15

             Copyright (c) Microsoft Corporation

Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

 We also could execute the T-SQL command:

select serverproperty('Edition')

which then could show this result:

Enterprise Edition (64-bit)

So far so good. No change to what we were used to with earlier releases of SQL Server. The term ‘Enterprise Edition’ is the same as it had been before with earlier release of SQL Server as well. So which one of the Enterprise Editions is the one shown above now? The per-CAL licensed one or the per-Core licensed one?

Answer is: It is the CAL licensed one and with that the Enterprise Edition which is limited to 20 cores!!!

 

How does the core-licensed show up then?

The per-core licensed Enterprise Edition will show like this:

2012-05-18 23:57:29.77 Server Microsoft SQL Server 2012 - 11.0.2100.60 (X64)

Feb 10 2012 19:39:15

Copyright (c) Microsoft Corporation

Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

 Executing:

select serverproperty('Edition')

which then could show this result:

Enterprise Edition: Core-based Licensing (64-bit)

 

Other indications that there might be a limitation to 20 cores could be identified as well at the beginning of the SQL Server 2012 errorlog where we can find a message like:

SQL Server detected 4 sockets with 6 cores per socket and 6 logical processors per socket, 24 total logical processors; using 20 logical processors based on SQL Server licensing.

In the case above, we are looking at a server with the last generation of Intel processors which did not have Hyperthreading yet. Or in more modern Intel Servers with Hyperthreading it would look like:

SQL Server detected 4 sockets with 8 cores per socket and 16 logical processors per socket, 64 total logical processors; using 40 logical processors based on SQL Server licensing.

 

Another possibility of discovery is through the Microsoft MAP toolkit. Where to get it and how to use it is excellently described in this document: https://download.microsoft.com/download/F/F/2/FF29F6CC-9C5E-4E6D-85C6-F8078B014E9F/Determining_SQL_Server_2012_Core_Licensing_Requirements_at_SA_Renewal_Apr2012.pdf

 

How is the throttle of 20 cores enforced for the CAL license-based Enterprise Edition?

The limitation or the cap is enforced by the # of SQL Server schedulers. Usually SQL Server creates one scheduler thread for every logical CPU on a server. Each of those scheduler threads is administrating a pool of worker threads which execute requests or are in different other states. A scheduler only can have one thread running at maximum. If a scheduler thread over all of the time has one of worker threads running, it can leverage at maximum one logical CPU and not a bit more. If there are (as in the second situation above) only 40 schedulers active to schedule worker threads, the maximum number of CPU power we can use at any given time is 40 logical CPUs.

Querying sys.dm_os_schedulers with this query:

select * from sys.dm_os_schedulers

we will realize that the all the schedulers are ‘Visible’ for all the logical CPUs, but only 40 of them will be ‘Online’, whereas the others are ‘Offline’

If you disable Hyperthreading, the number of schedulers being Online will decline to 20, since one single core is now represented by one CPU thread only compared to two with Hyperthreading enabled. In cases where there are many more CPU threads or logical CPUs than the limit of the Server+CAL licensed SQL Server 2012 Enterprise Edition, one certainly can use affinity mask settings to chose the CPUs SQL Server shall use.

How do we change between different releases?

In order to move between the two different SQL Server 2012 Enterprise Editions SKUs, no new bits are necessary. The SKU of SQL Server is determined by the PID which needs to be typed in during the installation process. The PID hence is tied to the licensing contract. Hence in order to change from the Server+CAL licensed Enterprise Edition SKU to the per-core licensed one, one needs to have a licensing contract that is per-core based.

The SQL Server Setup Application itself does allow to move from one SKU to another SKU within the same SQL Server main release. The different possible Edition to Edition Upgrades of SQL Server 2012 are listed at the end of this article: https://msdn.microsoft.com/en-us/library/ms143393.aspx  V2.0: Please note that the content behind this link got changed and the change between the two different EE releases through Edition Upgrade as listed below got added to the list of supported Edition Upgrades.

  • What is not mentioned yet is the conversation/upgrade between the two different Enterprise Edition SKUs. However it does work. Here is how:
  • Start the SQL Server Setup Application (we call it 'SQL Server Installation Center' meanwhile since it can do way more than simply installing SQL server)
  • Choose the item Maintenance, and then select Edition Upgrade
  • In some cases Setup Support Files might be installed. In very rare case a reboot might be asked for afterwards.
  • The System Configuration Checker runs a discovery operation on your computer as next step. To continue, click OK.
  • On the Product Key page, select the radio button for entering PID. Enter the new PID which will move you to ‘the other type’ of Enterprise Edition
  • The next page appearing is the License Terms page. Read the license agreement, and then accept the licensing terms and conditions and click 'Next'.
  • In the next page, all instances will be listed. Chose the one which you want to upgrade and continue.
  • Now the Edition Upgrade Rules validate the computer configuration before the edition upgrade operation begins. In this step the last rule might bring up a warning. We observed this in cases where the instance to be changed between the two Enterprise Editions was running AlwaysOn Availability replicas. In all our cases, it did work with ignoring the warning and clicking ‘Next’. However in your specific case, you want to test this Edition Upgrade first in your test system to make sure that you are successful before executing such a step in a production server.
  • The Ready to Upgrade Edition page shows a tree view of installation options of the selected instances that were specified during Edition Upgrade Steps. To continue with the Edition Upgrade, click Upgrade.
  • After a few minutes the Edition Upgrade should be finished. You can check the success by looking into the errorlog.

What do we recommend?

Reading through the licensing conditions which we pointed out before, it becomes clear that the Server+CAL licensed Enterprise Edition for SQL Server 2012 should be more the exception than the norm for deployments moving forward. Nevertheless it could show up in the SAP space as well, dependent on the particular licensing conditions you as a customer have with Microsoft. Dependent on the size of your individual SAP applications and the workload applied, being limited to 20 cores indeed could present a performance and scalability bottleneck. Customers looking to upgrade SQL Server Enterprise Edition deployments to 2012 and support more than 20 cores or deploy new SQL Server 2012 Enterprise Edition servers should start planning to purchase their SQL Server 2012 Enterprise Edition under the core licensing model.