LICENSEWARE

How do you license SQL Server 2022 in containers?

Archive. This is an archived LICENSEWARE Wiki page, kept as a source. It is not a cited encyclopedia article and may contain unsourced or outdated claims. Use the encyclopedia articles for current, cited terms.

Archive: this is an archived LICENSEWARE Wiki article from the Microsoft White Papers gallery, last edited 2024-08-23, kept as a source. It is not an encyclopedia article and may contain unsourced or outdated claims. For current, cited terms see SQL Server licensing, Virtualization and partitioning.

On This Page

Running SQL Server in containers has become a popular option for many organizations seeking flexibility, efficiency, and scalability in their IT environments. With the advent of SQL Server support on Linux and Docker platforms, it’s now possible to run SQL Server in containers using Docker. This brings several benefits, such as faster start-up times, resource optimization, and easier management compared to traditional virtual machines (VMs). However, when it comes to licensing SQL Server in a containerized environment, there are specific considerations to keep in mind.

Understanding Containers and Virtual Machines

Before diving into the licensing details, it’s important to understand the fundamental differences between containers and virtual machines. Containers are lightweight, standalone software packages that include everything needed to run a piece of software, including the code, runtime, system tools, libraries, and settings. Unlike virtual machines, containers share the host system’s operating system kernel, which makes them more efficient in terms of resource usage and faster to start and stop.

Virtual machines, on the other hand, are more isolated and come with a full guest operating system, including its own kernel. This provides greater isolation between applications but at the cost of higher resource consumption and slower start-up times. Both containers and VMs are considered operating system environments (OSEs) from a licensing perspective, defined as either an entire or partial instance of an operating system or a virtual operating system instance with a separate machine identity.

Licensing SQL Server in Containers: Per Core Model

When you choose to run SQL Server in containers, you have two primary licensing models to consider: the Per Core model and the Server+CAL (Client Access License) model.

If you opt for the Per Core licensing model, the licensing requirements are based on the number of virtual cores (v-cores) or virtual processors/CPUs/threads that support the containerized SQL Server instance. Here’s what you need to know:

  • Core Licenses for Virtual Cores: You need to purchase a core license for each virtual core assigned to the container running SQL Server. A virtual core, in this context, maps directly to a hardware thread.
  • Minimum Licensing Requirement: There is a minimum requirement of four core licenses per container. This means even if your container uses less than four v-cores, you must still license it with four cores.
  • Flexible Virtualization Benefit: If your organization frequently moves containers across different hosts to balance workloads or reallocate resources dynamically, Microsoft’s Flexible Virtualization Benefit can be particularly advantageous. This benefit allows for flexible reassignment of licenses, making it easier to manage SQL Server deployments across a virtualized or containerized environment without violating licensing terms.

This model is particularly beneficial for organizations that require high scalability and flexibility, as it allows for the reassignment of licenses between servers and containers as workloads shift, provided that the total number of licensed cores is maintained.

Licensing SQL Server in Containers: Server+CAL Model

Alternatively, you can choose the Server+CAL licensing model. This model is more straightforward but comes with its own set of requirements:

  • Server Licenses per Container: In this model, you must purchase a separate SQL Server license for each container that is running SQL Server, regardless of the number of virtual processors allocated to each container. For example, if you are running SQL Server Standard Edition on six different containers, you will need six server licenses.
  • Client Access Licenses (CALs): In addition to the server licenses, each user or device that accesses the SQL Server instance on the container needs a CAL. This can quickly add up in environments with a large number of users or devices accessing the SQL Server.

This model can be more cost-effective for smaller environments or those with a limited number of users and devices. However, for larger or more dynamic environments, the Per Core model with the Flexible Virtualization Benefit may offer more flexibility and potentially lower costs.

Which Licensing Model is Right for You?

Deciding between the Per Core model and the Server+CAL model depends largely on your organization’s specific needs and environment. If your setup involves a high degree of containerization with frequent movement and scaling of workloads, the Per Core model with its flexible reassignment rules may offer better value and ease of management. On the other hand, if you have a more static environment with a predictable number of users, the Server+CAL model might be more straightforward and economical.

Final Considerations

When licensing SQL Server in a containerized environment, it’s essential to consider not just the current usage but also future scalability, workload distribution, and user access needs. Microsoft’s licensing policies for SQL Server in containers are designed to provide flexibility, but they also require careful planning to ensure compliance and cost-effectiveness.

In summary, understanding the nuances of SQL Server licensing in containers will help you make informed decisions that align with your organizational goals, whether you are optimizing for cost, flexibility, or both. As always, for the most accurate and up-to-date information, consider consulting with a Microsoft licensing expert or partner to ensure that your SQL Server deployment is fully compliant with Microsoft’s licensing terms.

See also

Esc