Post navigation

Azure SQL Database – Aborting Scale Request

Scaling up or down an Azure SQL Database is a very common task. Whilst common it is also very easy to do via the Azure portal or even PowerShell. When you scale a database please be aware that it creates a replica of the original database at the new performance level and then switches connections over to the replica but what do you do if you want to cancel the scale request?

I had an issue where my scale request was taking hours for a 1.5GB database, obviously something was not right so I wanted to abort the request. There is no option within the portal or TSQL code to do this. You will need to call upon the Azure CLI to complete this task (see red arrow below).

Once you have clicked Azure CLI issue the following, don’t forget the scaling request is running we just want to see it and confirm that fact.

az sql db op list -d DatabaseName -g ResourceGroup -s ServerName

Now take note of the GUID like value (e3156134-d061-47b1-9c89-8bf62fd8d04f) for “name” we will need it for the next command as -n where n is the unique name of the operation to cancel.