Azure SQL DB License Type - master vs client dbs.

Arthur Quenneville 41 Reputation points

I have been writing resource graph queries to gather information on our Azure SQL Servers and DBs.

I noticed a handful of the databases have 'LicenseIncluded' when it should not be. I browsed to the specific databases within the portal and went to 'Configure' to switch the SQL License from 'yes' to 'no'.

To my surprise no was already selected. I have not been able to find the setting to change this for our client databases.

I did a query with az sql db list to gather some more information and it shows the client databases as LicenseIncluded while 'master' is set to null.

Does anyone know how to modify the license type of the specific databases?

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,586 Reputation points

    Hi @Arthur Quenneville , welcome to Microsoft Q&A forum.

    License Type belongs to 2 categories:
    BasePrice - Azure Hybrid Benefit (AHB) discounted pricing for existing SQL Server license owners is applied. Database price will be discounted for existing SQL Server license owners.
    LicenseIncluded - Azure Hybrid Benefit (AHB) discount pricing for existing SQL Server license owners is not applied. Database price will include a new SQL Server license costs.

    So when we say LicenseIncluded that means the pricing of the database will include new license cost as well. On the other hand, BasePrice means if user has existing license they can utilize that license and cost will be adjusted accordingly.

    In your case as you see LicenseIncluded which is same as 'no' option when you configure the database. But we can change this either from portal or through the below PowerShell command as well:

    --This sets it to 'No'  
    Set-AzSqlDatabase -ResourceGroupName "yourresgroup" -DatabaseName "yourdb" -ServerName "yourserver" -LicenseType "LicenseIncluded"  
    --This sets it to 'Yes'  
    Set-AzSqlDatabase -ResourceGroupName "yourresgroup" -DatabaseName "yourdb" -ServerName "yourserver" -LicenseType "BasePrice"  

    Please let me know if this helps or else we can discuss further.


    If answer helps, please mark it as 'Accept Answer'

    0 comments No comments

0 additional answers

Sort by: Most helpful