Windows Server edition considerations
Disclaimer: Licensing and costing are areas which are better handled by MS licensing experts; all information mentioned in the document has been taken from MS documents present online. Licensing has legal aspects and can change anytime, so, before proceeding, it is highly advised to speak to a MS licensing specialist of your region.
With Windows Server 2012 and above, Standard Edition now has full support for clustering, not just simple 2-node active/passive clusters, but fully configured clustering support. Before Windows Server 2012, only Windows Server Enterprise Edition could support Windows Server Failover Clustering (WSFC). Starting from Windows Server 2012, clustering got a huge licensing cost reduction.
The cost of Windows Server 2012 Standard is almost the same as that of Windows Server 2008 R2 Standard, but Windows Server 2012 Datacenter Edition has almost 26% price increase. There is no difference throughout feature support between Windows Server 2012 Standard and Datacenter edition; the major difference is that Standard only supports hosting of 2 virtual machines (by default), while in Datacenter this is unlimited. You can host more than 2 VMs on Standard, but that will imply an extra cost.
The difference in pricing, though, is substantial. Not including CALs, Windows Server 2012 R2 Standard Edition typically runs around $882 for 2 processors, while Windows Server 2012 R2 Datacenter Edition typically costs around $6,100 for 2 processors.
SQL Server Edition Consideration & Licensing
SQL Server Enterprise is roughly 4 times more expensive comparing to Standard edition. The complete details can be read/downloaded from SQL Server 2016 Licensing Model. SQL Server follows 2 licensing models.
- Core Based
- Server + CAL based
Core Based Licensing
Under the Per Core licensing model, each server running SQL Server 2016 software or any of its components (such as Reporting Services or Integration Services) must be assigned with an appropriate number of SQL Server 2016 core licenses. The number of core licenses needed depends on whether customers are licensing the physical server or individual virtual operating system environments (OSEs).
Unlike the Server+CAL licensing model, the Per Core model allows access for an unlimited number of users or devices to connect from either inside or outside of an organization’s firewall. With the Per Core model, customers do not need to purchase additional client access licenses (CALs) to access the SQL Server software.
NOTE: The use of hyper-threading technology does not affect the number of core licenses required when running SQL Server software in a physical OSE.
When deploying SQL Server 2016 software in virtualized environments, customers have the choice either to license individual virtual machines as needed or to license for maximum virtualization in highly virtualized, private cloud, or dynamic environments. Maximum virtualization can be achieved by licensing the entire physical server with Enterprise Edition core licenses and covering those licenses with Software Assurance (SA).
With SQL Server 2016 Enterprise Edition, customers who have licensed all physical cores on the server can run an unlimited number of instances of the software in a number of OSEs (physical and/or virtual) equal to the number of core licenses assigned to the server. For example, a four-processor server with four cores per processor—fully licensed with sixteen core licenses—can run SQL Server software in up to sixteen VMs, regardless of the number of virtual cores allocated to each VM.
Server & CAL Based Licensing
When licensing the SQL Server 2016 Standard Edition software under the Server+CAL model, customers purchase a server license for each server, and a client access license (CAL) for each device (Device CAL) and/or user (User CAL) accessing SQL Server or any of its components. A CAL is not software; it is a license granting users and devices access to the SQL Server software.
SQL Server CALs are required for users or devices that directly input into, query, or view data from an SQL Server database. Similarly, SQL Server CALs are required for users or devices that input data into, query, or view data from a SQL Server database through a pooling device (such as the CRM Server in the figure above). This includes users who view data through web-based applications or enter information into a database through an intermediary product.
Licensing for SQL Server HA
The secondary server used for failover support does not need to be separately licensed for SQL Server as long as it is truly passive, and the primary SQL Server is covered with active SA. If it is serving data, such as reports, to clients running active SQL Server workloads, or performing any “work”, such as additional backups being made from secondary servers, then it must be licensed for SQL Server.
Primary server licenses covered with SA include support for one secondary server only, and any additional secondary servers must be licensed for SQL Server. Note: The rights to run a passive instance of SQL Server for failover support are not transferable to other licensed servers for purposes of providing multiple passive secondary servers to a single primary server.
When licensing SQL Server 2016 under the Per Core model, the number of core licenses must be based on the server that requires the higher number of licenses. This way, when the failover server takes over, it will be adequately licensed. For a passive instance of SQL Server to be properly licensed, it cannot require more core licenses than the licensed primary system.
When secondary servers are actively used to support these additional workload scenarios—that is, when the servers used for failover purposes are no longer truly passive—they must be fully licensed accordingly. When licensing SQL Server software under the Server+CAL licensing model, users and devices that indirectly access SQL Server data through another application or hardware device still require SQL Server CALs.
Comparison between Always On Basic Availability Groups and Always On Availability Groups
Now, let’s take a closer look at the features of both Always On Basic Availability Groups and Always On Availability Groups. Just to make it simpler, I shall refer to them as BAG and AG respectively.
|AG (with FCI)
|1. Limit of two replicas (the primary and the secondary).
|1. While in AG, you can configure 2 Sync and 6 Async Replicas. A total of 8 secondary replicas is supported in SQL Server 2016 Enterprise edition
|2. No read access on the secondary replica, So, no license cost involved for the secondary replica in BAG.
|2. For AG you have an option of making a secondary one readable, which will allow you to run reporting queries, checkdb, and backup on secondary replicas. Since you can run a query on a secondary replica, you have to fully license it.
|3. Since the secondary replica is not readable in BAG, any type of backup is not possible.
|3. If you have chosen read-only replicas, you can offload your full and transaction log backups (copy only backups) on a secondary replica.
|4. No support for adding or removing a replica to an existing basic availability group.
|4. You can add replicas to AG unless you do not exceed the limitation set by MS.
|5. Support for one availability database.
|5. No such practical limitation on databases that can come under one AG.
|6. Option to add one Listener.
|6. Option to add multiple Listeners.
|7. Basic availability groups cannot be upgraded to advanced availability groups. The group must be dropped and re-added to a group that contains servers running only SQL Server 2016 Enterprise Edition.
|7. This is Enterprise Edition and has all features, so there is no need for the upgrade.
|8. Basic availability groups are only supported for Standard Edition servers.
|8. AG are supported and can be configured only in Enterprise Edition.
Cost and Budget
|SQL Server 2016 Enterprise Edition
|$27,495 for 4 cores, $13,747.50 per additional 2 core packs.
|Core Licensing Only for SQL Server 2016 Standard Edition
|Core licensing costs $7,171 for 4 cores, $3,585.50 per additional 2 core packs
|Server plus CAL Licensing
|Server plus CAL Licensing $898 per server. CALs are $170 per named users
|Costs about 7k$ per core
|AG (with FCI)
|For setting up BAG, a License for only one SQL Server would be required. You can go for either a core based or a Server+CAL based one. This is because the secondary replica cannot be used to run checkdb or backup or any reporting query, so it actually does not require licensing as per MS licensing terms.
|For setting AG FCI, a Minimum of 3 servers are required, but SQL Server license would only be required for 2 machines. In the 2-node cluster, one node will always be “Passive” and will never own the resources, so it is actually not utilized at all.
|For 4 core SQL Server Standard Edition, the cost would be around $7200. The user should also note the limitations for BAG outlined in the section above.
|Assuming 4 cores are present in all the machines and Windows Server 2016 or Windows Server 2012 is used, total SQL Server cost will be approximately (27,495 *2 ) = 54,990$. This is almost 7.5 times more than the BAG, but the features provided in SQL Server Enterprise outweigh this.
|Setting up BAG on Windows Server Standard edition would reduce the licensing cost even more as Windows Server 2016 Standard supports BAG and failover clusters and has lower cost as compared to Datacenter edition.
|Similar goes for setting up AG on Windows Server Standard edition, but If you are going to host multiple Hyper-Vs on Windows OS, it would be better to go for Datacenter Edition of Windows Server and just license the cores so that you could create as many VMs as you like without worrying about licensing each one of them.
As you can see, the licensing costs of Always On Basic Availability Groups are much lower than those of Always On Availability Groups introduced in SQL Server Enterprise Edition. However, it’s the functionality that makes the price go up. Just for example, in BAG, you are limited with 2 replicas, while in AG you can create 8 (2 synchronous and 6 asynchronous), plus, you get all the features of the Enterprise edition. So, when choosing between BAG and AG, the question is not the price, but the functionality required for your infrastructure.