(SQL) Tip of the Day: Cancelling a V12 Migration via PowerShell

Today’s (SQL) Tip…

If you are moving from V11 to V12 with a large database and are on a lower tier such as S0 or Basic you will notice it can take a very long time. This is because you are limited to the DTUs available to you during the move from V11 to V12 also. To work around this you can move to a higher tier database during the move and move back down after it has finished.

If you are already in the middle of the migration and it has taken a long time you can cancel the migration via Azure powershell and the cmdlet Stop-AzureSqlServerUpgrade.

To do this, install the latest version of Azure Powershell.

Run:

Switch-AzureMode AzureResourceManager

Get-AzureSqlServerUpgrade -ServerName ExampleServer -ResourceGroupName ExampleResourceGroup

If the status is listed as InProgress you can run

Stop-AzureSqlServerUpgrade -ServerName ExampleServer –ResourceGroupName ExampleResourceGroup

Once Get-AzureSqlServerUpgrade shows “Stopped” as the status you can change your edition and restart the migration.