Frequently asked questions for SQL Server on Linux virtual machines

Applies to: SQL Server on Azure VM

This article provides answers to some of the most common questions about running SQL Server on Linux virtual machines.

If your Azure issue is not addressed in this article, visit the Azure forums on MSDN and CSDN. You can post your issue in these forums. You also can submit an Azure support request. To submit a support request, on the Azure support page.

Images

Azure maintains virtual machine (VM) images for all supported major releases of SQL Server on Windows. For more information, see the complete list of Windows VM images. For Linux, review the transition to a script-based provisioning model in the SQL Server on Azure Linux VMs overview.

To see the SQL Server packages that are installed by default on SQL Server on Linux, see Install SQL Server on Linux.

Creation

How do I create a Linux virtual machine with SQL Server?

The easiest solution is to create a Linux virtual machine that includes SQL Server. For a tutorial on signing up for Azure and creating a SQL Server VM from the portal, see Deploy a Linux virtual machine running SQL Server in the Azure portal. You also have the option of manually installing SQL Server on a VM with either a freely licensed edition (Developer or Express) or by reusing an on-premises license.

Why can't I provision an RHEL or SLES SQL Server VM with an Azure subscription that has a spending limit?

SLES virtual machines require a subscription with no spending limit and a verified payment method (usually a credit card) associated with the subscription. If you deploy a SLES VM without removing the spending limit, your subscription gets disabled and all VMs/services stopped. If you do run into this state, to re-enable the subscription remove the spending limit. Your remaining credits will be restored for the current billing cycle but a or SLES VM image surcharge will go against your credit card if you choose to re-start and continue running it.

Licensing

How can I use my own SQL Server license on an Azure VM?

During SQL Server on Azure VM portal deployment, select Azure Hybrid Benefit as the licensing model. You can also create a Linux OS-only virtual machine, run the SQL Server installation steps for your Linux distribution, and then register the VM with the SQL IaaS Agent extension. Unless you're installing one of the freely licensed editions of SQL Server, you must have a SQL Server license and License Mobility through Software Assurance on Azure.

Can I switch between pay-as-you-go and Azure Hybrid Benefit after deployment?

Yes, if the VM is registered with the SQL Server IaaS Agent extension. VMs created by using the SQL Server on Azure VM portal deployment experience are registered automatically. The change takes effect immediately, doesn't cost extra, and doesn't restart the VM or the SQL Server service.

  • Azure portal: Go to your SQL virtual machine resource. Under Settings, select SQL Server configuration, and then select Manage.
  • Azure CLI: Run az sql vm update -n <VM_NAME> -g <RESOURCE_GROUP> --license-type AHUB.
  • Azure PowerShell: Run Set-AzSqlVM -Name <VM_NAME> -ResourceGroupName <RESOURCE_GROUP> -LicenseType AHUB.

To switch back to pay-as-you-go, use PAYG as the license type.

Administration

Can I manage a Linux virtual machine running SQL Server with SQL Server Management Studio (SSMS)?

Yes, but SSMS is currently a Windows-only tool. You must connect remotely from a Windows machine to use SSMS with Linux VMs running SQL Server. Locally on Linux, the new mssql-conf tool can perform many administrative tasks.

Can I remove SQL Server completely from a SQL Server VM?

Yes, but you'll continue to be charged for your SQL Server VM as described in Pricing guidance for SQL Server Azure VMs. If you no longer need SQL Server, you can deploy a new virtual machine and migrate the data and applications to the new virtual machine. Then you can remove the SQL Server virtual machine.

Updating and patching

How do I upgrade to a new version/edition of the SQL Server in an Azure VM?

You can upgrade to a new version or edition of SQL Server on your SQL Server on Azure VM by using the desired setup media. Once your SQL Server has been upgraded, delete the extension from the VM, and then re-register your SQL Server on Azure VM with the SQL IaaS Agent extension once more to accurately reflect the new version or edition of SQL Server in the Azure portal.