SQL Server Resource Provider for Azure Virtual Machines

azure virtual machine

Azure provides different options to host your SQL Server workload in the cloud. You can migrate to Azure Managed Instances, Azure SQL Server Database, or you can use Virtual Machines with SQL Server installed (IAAS – Infrastructure as a service option). For SQL Servers installed on Virtual Machines, you can also benefit from the Microsoft Azure Hybrid Benefit for Windows and SQL Server, although this does not require Azure SQL Server Resource Provider. Further information on hybrid Benefit can be found here: https://azure.microsoft.com/en-us/pricing/hybrid-benefit/

With this option, you also have the advantage of 3 years of free Extended Security Updates from Microsoft, which is especially attractive if you migrate your SQL Server 2008/2008 R2 instances to an IAAS solution, now that these versions of SQL Server are no longer supported by Microsoft (unless they are migrated to Azure).

Microsoft also provides you with an Azure SQL Server Resource Provider. If you have deployed an Azure VM with SQL Server using a VM Azure Marketplace template then your SQL VM is automatically added to the Azure SQL Server Resource Provider. If you have provisioned your SQL Server VM manually (i.e. installed SQL Server yourself and not from an Azure provided marketplace template) then you can manually register the VM with SQL VM Resource Provider.

These VM’s can all be easily managed through the Azure SQL Pane or the SQL Manage portal. More information on these portals can be found here: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-manage-portal

There are also multiple change management modes which can be utilized for Azure SQL Server Resource Provider, allowing for further flexibility and options.

  • Full mode delivers all functionality, but requires a restart of the SQL Server and system administrator permissions. This is the option that’s installed by default.
  • Lightweight does not require the restart of SQL Server, but it supports only changing the license type and edition of SQL Server
  • NoAgent is dedicated to SQL Server 2008 and SQL Server 2008 R2 installed on Windows Server 2008

Further information about the change management modes can be found here: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-register-with-resource-provider?tabs=powershell#change-management-modes

Why Should I Use Azure SQL Server Resource Provider?

  • Simplify License Management: Microsoft requires customers to inform them if you are using Azure Hybrid Benefit. Having a SQL VM registered with Azure SQL Server Resource Provider simplifies SQL Server License Management and helps to quickly identify any SQL Server VMs using Azure Hybrid Benefit via the Azure portal or by using Azure CLI
  • Extra Features: Registered SQL Server VMs have access to automated patching and automated backup, as well as monitoring and manageability facets
  • Free Management: There is no cost involved in utilising Azure SQL Server Resource Provider

How do I enable SQL VM Resource Provider?

To enable SQL Server VM Resource Provider or to check to see if it is enabled, perform the following steps:

  1. Log onto your Azure Portal
  2. In the Portal select ‘All Services’
  3. Select ‘Subscriptions’ from the ‘All Services’ window
  4. Select your subscription
  5. Select ‘Resource Providers’ and filter by SQL
  6. Look for ‘Microsoft.SQLVirtualMachine’. Register this provider if it is unregistered. If it is registered, then you already have Azure SQL Server Resource Provider enabled
  7. In order to enable Azure SQL Server Resource Provider for your VM, follow the steps given here: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-register-with-resource-provider?tabs=powershell

Next Steps – What can I do?

Once you’ve registered your Azure SQL VM with Azure SQL Server Resource Provider, you’ll have access to more management options for the Azure SQL VM. Each of these features can be accessed from the specific SQL Server VM in the Azure Portal, or by using Azure CLI.

Manageability of Features: One you have registered your Azure VM, you can configure and control different features. For example; you might enable the Automated backup service, but you might not enable automated patching. You can change these options as desired.

Flexible Licensing: If needed, you can change your license type in the portal once the SQL VM is registered with Azure SQL Server Resource Provider. This may result in a cheaper solution.

Flexible Licensing

Automated Backup: This allows you to configure managed backups for all existing and new databases on an Azure VM if it is running SQL Server 2016/2017 Standard, Enterprise or Developer Edition. Regular database backups will be performed to Azure blob storage. This option can be accessed from the SQL VM properties:

Automated Backup

Automatic Patching: This allows configuration of a maintenance window, which defines when automated updates can be applied to the SQL Server Virtual Machine. The maintenance window ensures that all patching and any associated reboots are performed during this time.

Automatic Patching

For more information on Azure SQL Server Resource Provider and its benefits, please refer to: https://docs.microsoft.com/en-au/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-register-with-resource-provider?branch=pr-en-us-80472&tabs=powershell

Should you require assistance with this functionality don’t hesitate to contact WARDY IT Solutions for assistance.

Contact the team at WARDY IT Solutions