Businesses who need high availability and disaster recovery usually want three servers:
- A primary SQL Server where all the writes & reads take place
- A high availability SQL Server sitting right next to the primary, in the same data center, keeping up with its writes, and
- A disaster recovery SQL Server sitting in another city or region, keeping up with the writes, but not necessarily in real time – the writes here are usually asynchronous
There are several different techniques we can use to keep those in sync, like failover clustering, Always On Availability Groups, SAN replication, log shipping, and database mirroring.
Regardless of which technology you use, there’s an important question: do you have to license the standby SQL Servers, aka #2 and #3? Since November 2019, you don’t have to pay licensing for those SQL Servers in most circumstances. Microsoft changed the licensing terms when SQL Server 2019 came out.
As long as your licensing is covered under Software Assurance, you get several new benefits including:
- One high availability server is free
- One disaster recovery server is free
- You can offload corruption checks, full backups, and log backups to these servers too
- But you still can’t query them. As soon as you start offloading end user queries onto them, they need to be fully licensed.
Isn’t that awesome? And the best thing is that you don’t even have to be running SQL Server 2019 in order to get those benefits! As long as you’re current on Software Assurance, you get this on any supported version.
This is the kind of thing that really makes an impact on your high availability and disaster recovery architectures, and I’ll be talking about that on Thursday, June 17th.
For option #2, can it be in a read-only mode so that you can do reporting off of it?
Doesn’t this address your question? “But you still can’t query them. As soon as you start offloading end user queries onto them, they need to be fully licensed.”
Does this apply also for BASIC availability groups on Standard Edition?
The SQL 2019 Licensing Guide doesn’t limit the HA/DR methodology, and actually says: “For the purposes of this guide, we are not drawing a distinction in how high availability is being implemented,”
However since BASIC AGs only gives a singe secondary you’re 3rd & 4th servers (yes, the guide says you can actually have a 4th one in Azure) would need to use Log Shipping.
The only underlying requirement is a licensed server with SA.
From the guide:
For each on-prem server OSE licensed with SQL Server 2019 and covered by active SA, customers can use the
following passive replicas in anticipation of a failover event:
• One passive fail-over replica for High Availability in a separate OSE
• One passive fail-over replica for Disaster Recovery in a separate OSE
• One passive fail-over replica for Disaster Recovery in a single VM on Azure
Nice points Miller, tks for the tips. This is a huge incentive for small clients to enroll in SA. I’m a big noob regarding MSSQL HA/DR methods. I’m really looking forward Brent’s next webinar about it.
Anyone know how you’d take advantage of this in Azure sql? I can tell from another comment that you *can*, but can’t see *how*.
If you’re referring to Azure SQL DB, that’s a completely different product with different pricing and licensing.
I’ve been over the Microsoft SQL Server 2019 Licensing Guide, and as I read page page 29, you can have a 3rd free instance in Azure.
Yep, there’s lots of cool benefits in the guide!
Hi Brent, thanks for the great info!
Is it only from sql 2019? Or did they change that policy back as well?
Gil – that’s covered in the post.
You are right, i guess im not a morning person! Sorry about that 🙂
So what happens when you license at the VM Host level? Can you split your active instances over 2 datacenters?
This will help a lot with load balancing on the network and SAN level.
At the moment all our primaries are in one data center and secondaries in another.
That’s well outside of the scope of this blog post and webcast, sorry. For personalized help on this kind of thing, click Consulting at the top of the page. Thanks!
Brent, is that true even if your SQL Servers are in the cloud, not on-prem? And what about if in AWS, not Azure — does that not count for the cloud DR server?
The licensing guide seems to be explicit about using the words “on-prem” and “Azure”:
“For each on-prem server with SQL Server 2019 and covered by active SA, customers can use the following passive replicas in anticipation of a failover event:
• One passive fail-over replica for High Availability in a separate server
• One passive fail-over replica for Disaster Recovery in a separate server
• One passive fail-over replica for Disaster Recovery in a single VM on Azure”
Yes, that last line that says “on Azure” isn’t even covered in my post. I wanted to keep things simple.
Thanks Brent for the post. We are designing distributed availability groups, with one AG having 2 nodes in Data Center 1(Primary is Read/Write, Secondary is read-only) and another AG with 2 nodes in another Data Center or AWS (Forwarder node, Secondary node is read-only). How does the licensing works in this scenario? Thanks.
For personal advice on your architecture, click Consulting at the top of the page.
Be careful when offloading corruption checks to a secondary. You may incur the wrath of Mr Randal https://www.sqlskills.com/blogs/paul/the-curious-case-of-whether-corruption-can-propagate-to-secondary-databases/
I’ve actually blogged that even Paul’s advice isn’t strong enough, heh: https://www.brentozar.com/archive/2012/02/where-run-dbcc-on-alwayson-availability-groups/
For those that might be wondering what this means in terms of the financial aspect, we saved a significant (5-figure) amount on our last True-Up exercise by correctly identifying which of our SQL Server instances in our data centres were hosting active user queries and which were only accepting database mirroring (yes, we use it still, and yes I’m slowly but surely whittling it away…), log shipping or AlwaysOn AG async replica load.
If you’ve got SQL Server under Software Assurance, and you aren’t already using Max Virtualisation rights, you could be paying well over the odds right now, so go figure out what you have where to get the licence cost reduction!
Who knows, you might be able to convert that saving into investment in other software licences like monitoring 😀
One thing to note is once you do, you better watch like a hawk for colleagues moving databases around without considering the uptick in licence costs if they move active user load onto instances you’ve just marked as DR-only…
If we talk about SQL Server Enterprise license (not for standby server, but regular production server), it is licensed per processor core as we know. But which core ? Physical or logical ?
Say, if my planned server has 16 physical CPU cores, and 32 logical. Cost would be $7K x 32 cores, or $7K x 16 cores?
Howdy. For personal advice on production servers, click consulting at the top of the page. Cheers!
Et en 2023, on en est où?
J’aimerai bien échanger.
Voulez-vous coucher avec moi ce soir?