Upgrade Your SQL on Azure VM SKU

Mohit chhabra
medialesson
4 min readAug 4, 2020

--

Introduction

Recently I got a request from one of my clients that they want to upgrade the database from evaluation from Express to Web Edition. The SQL Database was hosted inside the Azure Virtual Machine so it’s was created with the gallery image of the SQL on Azure VM Database.

My initial thought was it should be a straight forward upgrade as Azure gives us the scalability to upgrade/downgrade as per our requirements so I went to the portal to upgrade and figured out that we have to do the manual upgrade in the virtual machine and then upgrade the version in the portal to update the billing.

Changing edition warning

Background

I logged into the virtual machine to upgrade the edition and run the setup wizard only to find out that I am not even getting the option to upgrade to the Web or Standard Edition.

Upgrade window

I did some research only to find out that it’s not currently possible to upgrade the same machine. Instead I need to create a new virtual machine with higher SKU of SQL Azure but it was not possible for me as this server had a lot of custom configurations that required us days to set it up and it will be a big effort to migrate this production workload with those custom configurations for multiple applications.

From the links above I figured out that It’s currently not supported and then I had to think out of the box to solve this issue.

Solution

I realized that that the reason I am getting only Evaluation, Express, and Developer as possible SKU upgrade options because this gallery template for SQL VM was set up with the express edition so I decided to replace the setup of the Web Edition of the SQL VM. Preceding are the steps that I followed.

  1. Create a VM with Web Edition
Create VM
Review + create

2. RDP into the new VM with the credentials and check for the SQL Setup which can be found at C:/SQLServerFull folder

SQL Setup

3. Zip the Setup and copy it to the new machine

4. Run the new setup upgrade wizard with the web edition key embedded in the setup

SQL installation
Enter Product Key
Select instance
Upgrade window
Complete window

6. Check if the upgrade was successful by running the following query in SSMS

select SERVERPROPERTY('Edition') as [edition]

7. Upgrade the SKU from the Azure Portal

Upgrade SKU from the Azure portal

Conclusion

We found out that the easiest way for upgrading the SKU for SQL Server running in an Azure VM is by creating another Virtual Machine with the new SQL SKU and moving the setup to old server and running the new setup in the old server.

The system can force you to restart the server once so please plan it accordingly. It saved me days of work and potential migration risk of production server and I hope it will be useful for the readers.

--

--