Probably one of the least fun things about being a DBA is having to deal with the licensing of SQL Server. Why isn’t this fun, well it requires the company you work for to spend money, and god knows companies like spending money like they like a whole in the head (I know, the analogy doesn’t exactly work for a company, but you get the idea).
If you’ve ever read through the Microsoft Licensing website it’s pretty wordy and pretty complex. I’ll try and demystify it a little bit here. Keep in mind that everything here covers all editions except for SQL Express as SQL Express is free, and the Developer edition as it is not for production use. This licensing information applies to all the services in the SQL Server suite. I’ll break this down more at the bottom.
In a nut shell you have two licensing options. Per CPU licenses, and per Core licenses.
Per CPU licenses require that you purchase one CPU license for each physical CPU in the server. So far Microsoft doesn’t charge per CPU core, and hopefully they don’t plan to. This gives them a huge marketing advantage over Oracle which charges you per CPU core. Now the catch here is it doesn’t matter how many CPUs SQL Server is configured to use. If the CPU is physically installed in the server it needs a license.
With VMs this license gets a little tricky. As you need one CPU license for each CPU that the VM sees. So if your VM is setup as a dual CPU VM (the Host presents two CPUs) to the VM then you need two licenses. The catch here becomes if you have a quad chip, quad core host (16 cores) and you present 8 cores to the guest OS you need 8 CPU licenses as your guest OS sees 8 CPUs.
Now there is a little known license plan which allows you to license the host machine, and not the guest OSs. If you have SQL Server Enterprise Edition you can license all the CPUs at the host level, which then gives you the right to install as many SQL Server Enterprise Edition servers on that host. So if you have two quad core quad CPU servers in a VMware customer and you plan on installing a bunch of SQL Server Enterprise edition licenses on lots of guest OSs, then this would be the cheapest route for you to take as you only need 8 CPU licenses and you are done. This option is not available with any edition other than the Enterprise Edition, so don’t try it with Standard or Workgroup.
There are a couple of major upsides to CPU licenses.
- You can have as many users connect to the SQL Server as you would like.
- You can install as many instances as you would like.
The downside to CPU licensing is that they are expensive. The Enterprise Edition of SQL Server 2008 lists for $25,000 per CPU.
So, that’s a little pricey for you, and you remember that up top I said there were two options.
The second option is to use CALs aka Client Access Licenses. With CALs there are a few things you have to deal with. Each instance you install requires that you purchase a server license. These list of a few hundred to a few thousand dollars per instance depending on the edition you select.
The misconception with CALs is that they are based on concurrent users. If you think that they are based on concurrent users you are wrong, accept it. Don’t try to explain why you are correct in the comments. This is directly from the SQL Licensing FAQ “In other words, a user CAL covers a particular user’s access to the server software from work computers and laptops…”.
So CALs are based on named users or named devices, you get to pick which one when buying the CALs. If your users have lots of devices that connect to the SQL Server then you will want to use user CALs. If your users share devices and you have less devices than you do users, then you want to use device CALs. If you have a mix between the two (management has lots of dedicated devices, and a call center where users share computers) then you can buy some of each, but license management will be a nightmare.
Now, if you plan on running a website and have two web servers connecting to your database, you only need two device CALs right? Nope, Microsoft already thought of this. CALs are owned by the end user accessing the information. It doesn’t matter how many layers of middle tier software are in between the user and the database. The basic idea here is that if you have an Internet facing application you need to have CPU cals unless every user that accesses the application has a CAL.
So the next question becomes when does it make sense to buy CPU licenses over CALs for an internal application. This comes down to math. If you have lots of servers, and only a few users then CALs are the way to go. If you have a few servers and lots of users then CPU licensing is probably the way to go. If you have lots of servers, and lots of users it gets a little trickier as you need to figure out which option is more cost effective.
Now there are a few catches with CALs that you need to be aware of.
CALs are good for the version of the product that you bought them with and lower, but not higher. So if you have SQL 2005 CALs and you want to install a SQL 2008 server and use CALs you’ll need to purchase new CALs for all the users that need access to the SQL 2008 server.
CALs can not be sold after you purchase the new versions CALs. In other words, using the example above, you can’t take the CALs that the SQL 2008 users no longer need and sell them on eBay to make up some of the cost of the SQL 2008 CALs.
CALs do have some upsides. Most importantly you only need one CAL to connect to all the SQL Servers in your company. So if you have 5 users, and 10 servers you only need 5 CALs to allow those 5 users to connect to all 10 servers.
So, up at the top I said that this information applies to all the services in the SQL Server Suite. What this means is that if you have CPU licensing and you install the SQL Engine, SSAS, and SSRS all on the same physical server you only need one set of licenses. You don’t have to license each one separately.
Now if you install the services on different physical servers then you will need to license each server separately. So if you are using CPU licenses and the database server has 2 CPUs, and the SSAS server has 2 CPUs and the SSRS server has 1 CPU then you need 5 CPU licenses.
Now, the other upside to CALs which I didn’t mention above is that a single SQL Server CAL allows you to connect to all the SQL Server services. You don’t need a separate CAL for SSAS, and a separate CAL for SSRS.
Hopefully this will help demystify SQL Server licensing for some. If it is still as clear as mud post your questions here, or twitter and I’ll post the answers that I can.
No matter what you read about licensing Microsoft can change the licensing setup at any time, so for final information be sure to check with your account manager or sales rep. If you have Licensing specific questions you can call Microsoft at (800) 426-9400 from the US or (877) 568-2495 from Canada. For other countries call your local Microsoft office to get the local number. I’ve called them before and they were very helpful in answering some questions.
DennyContact the Author | Contact DCAC