Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Stop / Cancel ongoing Azure SQL DB scale operation

Scenario:

if you want to cancel updating database pricing tier. this can be due to mistake, or long running scale Operation.

Resolution:

  1. edit the following command with your database details and execute the script
  2. $ResourceGroupName = ""
    $ServerName = ""
    $DatabaseName = ""
    #----------------------------------------
    $OperationName = (az sql db op list --resource-group $ResourceGroupName --server $ServerName --database $DatabaseName --query "[?state=='InProgress'].name" --out tsv) 
    if(-not [string]::IsNullOrEmpty($OperationName)) 
        {
            (az sql db op cancel --resource-group $ResourceGroupName --server $ServerName --database $DatabaseName --name $OperationName) 
            "Operation " + $OperationName + " has been canceled"
        }
        else
        {
            "No in progress operation found"
        }
    
  3. review the output to confirm operation has been canceled.

Share the post

Stop / Cancel ongoing Azure SQL DB scale operation

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×