eg1995-5273 avatar image
0 Votes"
eg1995-5273 asked eg1995-5273 commented

sql server on azure vm licensing


this is for the licensing experts.

i have an existing sql server on premises and i want to migrate it to azure using the lift and shift method. Azure migrate for server too

after migrating, i have to choose the vm size and all of that, but the option to choose sql on azure vm is not available in order to choose which license to apply whether it is byol or pay as you go?

so how can i license my sql after being migrated to an azure vm for both options: if I have SA for AHB and i i dont have SA for AHB

thank you in advance

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AlanKinane thank you so much you were so helpful.
just a quick additional question, what will happen if i configured ASR on my on premises SQL virtual machine ? how sql license on azure vm should be covered to be compliant?

because in an active/passive always on i can use the SA agreement but in the active/passive always both vms will be running. However, in ASR the azure sql vm will be provisionned upon a disaster recovery scenario.

thank you in advance

0 Votes 0 ·

@eg1995-5273 By default Windows VMs get created as PAYG – so Windows license is included in the cost.

For SQL Server Licenses, you should register the VM to the SQL VM RP post migration by installing their extension ( After registering you have the ability to either opt in for PAYG license for SQL, or indicate you are using Hybrid Benefit for SQL and stay compliant.

Hope this clarifies!

0 Votes 0 ·
eg1995-5273 avatar image eg1995-5273 SadiqhAhmed-MSFT ·

@SadiqhAhmed-MSF yes as alan mentionned it clarifies the migration licensing part.
however, what would happen in case of azure site recovery and upon a failover i created the vm from the replicates storage and this vm has sql workload. How i will cover sql licenses and i will be compliant noting that in case of asr i just might to use this server for a couple hours.

and please note i am talking about asr active/ passive not always on active/passive because in the second scenario i can use license mobility just to license my active node

hope you could help on that

0 Votes 0 ·

Hi @eq1995-5273, for most people in this scenario they will just use the PAYG licensing method for SQL Server as this way you will only be charged for the SQL licensing costs when the Azure VM is allocated so only in a failover scenario or for testing. Therefore the licensing costs will be quite small usually.

If you have the licenses already and with SA then this will cover you for active/passive as long as you are not running SQL on premises and on Azure at the same time so you could register the VM with the IaaS extension once it is provisioned if you wish to.

Please don't forget to accept my answer if you found it helpful.

0 Votes 0 ·

@eg1995-5273 Your answer can be found in the FAQ - Pricing - Site Recovery | Microsoft Azure

0 Votes 0 ·

@LimitlessTechnology-2700 you mean by license mobility that i can use sql cal based with SA only to cover the licenses of my passive nodes?

i wont benefit from reducing the licensing cost?
thank you

0 Votes 0 ·
AlanKinane avatar image
0 Votes"
AlanKinane answered

If you register the migrated SQL VM with the SQL IaaS agent extension for the resource provider then you will have access to these features. Please follow the steps here:

Note, you can only apply AHB if you have existing licensing with active software assurance. If you don't have SA then you will need to go for the PAYG option for your licensing.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello Eg1995,

There are three license models for an Azure VM that's hosting SQL Server: pay-as-you-go, Azure Hybrid Benefit (AHB), and High Availability/Disaster Recovery(HA/DR). You can modify the license model of your SQL Server VM by using the Azure portal, the Azure CLI, or PowerShell.

Only SQL Server core-based licensing with Software Assurance or subscription licenses are eligible for Azure Hybrid Benefit.

If you are using Server + CAL licensing for SQL Server and you have Software Assurance, you can use bring-your-own-license to an Azure SQL Server virtual machine image to leverage license mobility for these servers, but you cannot leverage the other features of Azure Hybrid Benefit.

Do follow the below link to proceed further,

Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.