Stopping or Postponing an upgrade to SQL Database V12
Published Mar 13 2019 06:12 PM 995 Views
Copper Contributor
First published on MSDN on Jun 05, 2015

As a customer running SQL Database on V11, you might have received an email informing you are about a scheduled upgrade of your database to V12 on a specific date.

This will also be reflected in the portal.  It will look like the following.

**** UPDATE 8/6/2015 ****

Upgrades for Web & Business edition databases to Basic and Standard performance levels based on the billable size as outlined here will begin before September 12th.  In case you need to postpone the upgrade please use the approach mentioned below to first cancel the upgrade and then reschedule for a future date. Additionally, note that if any databases are participating in a geo-replication scenario then you need to cancel and reschedule for all servers.

Canceling an Upgrade

Now let us take another scenario where you login to Portal and see that an upgrade is underway, you can cancel it using the Cancel Upgrade button.


Or, via PowerShell cmdlets.  An initial check using the Get cmdlet shows InProgress.

PS C:\> Get-AzureSqlServerUpgrade -ServerName w5axll7xap -ResourceGroupName Default-SQL-SouthCentralUS |Format-Table

ResourceGroupName              SerrverName                     Status
-----------------              ----------                      ------
Default-SQL-SouthCentralUS     w5axll7xap                      InProgress

Use the Stop cmdlet to cancel the upgrade.

PS C:\> Stop-AzureSqlServerUpgrade -ServerName w5axll7xap -ResourceGroupName Default-SQL-SouthCentralUS

Confirm
Are you sure you want to stop the upgrade for Azure Sql Database Server 'w5axll7xap'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

Check again using the Get cmdlet and it will show Cancelling.

PS C:\> Get-AzureSqlServerUpgrade -ServerName w5axll7xap -ResourceGroupName Default-SQL-SouthCentralUS |Format-Table

ResourceGroupName              SerrverName                     Status
-----------------              ----------                      ------
Default-SQL-SouthCentralUS     w5axll7xap                      Cancelling

And, finally, we will see a Stopped status indicating that the operation succeeded.

PS C:\> Get-AzureSqlServerUpgrade -ServerName w5axll7xap -ResourceGroupName Default-SQL-SouthCentralUS |Format-Table

ResourceGroupName              SerrverName                     Status
-----------------              ----------                      ------
Default-SQL-SouthCentralUS     w5axll7xap                      Stopped

Reschedule an Upgrade

We have released PowerShell cmdlets that allow you to reschedule the date as follows. These cmdlets utilize Azure Resource Manager that is loaded by running this command.  Be sure to first cancel the existing upgrade first (see above)!

PS C:\> Switch-AzureMode -Name AzureResourceManager

Next you need to setup access to your subscription. The simplest way to do this is via the Add-AzureAccount cmdlet.  You can find details on the initial setup here.

Using Azure PowerShell with Azure Resource Manager
https://azure.microsoft.com/en-us/documentation/articles/powershell-azure-resource-manager/ ...

Once you have setup correctly, you should see the following cmdlets related to upgrade.

PS C:\> get-help *-AzureSqlServerUpgrade | select -Property Name

Name
----
Stop-AzureSqlServerUpgrade
Start-AzureSqlServerUpgrade
Get-AzureSqlServerUpgrade

You are now ready to run the cmdlets to change the upgrade date. In order to do so you need to know a couple of properties – Server Name and Resource Group . Both of these are displayed in the Properties pane of server in the Portal.

The next step is simply to run the Start-AzureSqlServerUpgrade cmdlet with an additional parameter that specifies the new time you want the upgrade to be postponed to.

PS C:\> Start-AzureSqlServerUpgrade -ServerName w5axll7xap -ResourceGroupName Default-SQL-SouthCentralUS -ServerVersion
12.0 -ScheduleUpgradeAfterUtcDateTime 2015-06-12


ResourceGroupName               : Default-SQL-SouthCentralUS
ServerName                      : w5axll7xap
ServerVersion                   : 12.0
ScheduleUpgradeAfterUtcDateTime : 6/12/2015 12:00:00 AM
DatabaseCollection              :

The output of the cmdlet serves as confirmation that upgrade is now postponed to happen on or after the date you picked. It is that simple!

Rohit Nayak
Microsoft SQL Support - Escalation Services
@sqlrohit

Version history
Last update:
‎Mar 13 2019 06:12 PM
Updated by: