Edit

Share via


Monitoring Azure SQL Managed Instance management operations

Applies to: Azure SQL Managed Instance

Azure SQL Managed Instance provides monitoring of management operations that you use to deploy new managed instances, update instance properties, or delete instances when no longer needed.

Overview

All instance management operations can be categorized as follows:

  • Create
  • Update (changing instance properties, such as vCores or reserved storage).
  • Delete

For a detailed description of the steps and estimated duration of each management operation, review Management operations duration. Operations that require seeding data can extend the duration of an operation.

There are several ways to monitor managed instance management operations:

The following table compares management operation monitoring options:

Option Retention Supports cancel Create Update Delete Cancel Steps
Resource group deployments Infinite1 No2 Visible Visible Not visible Visible Not visible
Activity log 90 days No Visible Visible Visible Visible Not visible
Managed instance operations API 24 hours Yes Visible Visible Visible Visible Visible

1 The deployment history for a resource group is limited to 800 deployments.

2 Resource group deployments support cancel operations. However, due to cancel logic, only an operation scheduled for deployment after the initiated cancel action is canceled. Ongoing deployment isn't canceled when the resource group deployment is canceled. Since SQL managed instance deployment consists of one long running step (from the perspective of Azure Resource Manger), canceling resource group deployment doesn't cancel SQL managed instance deployment and the operation still completes.

SQL Managed Instance operations API

Management operations APIs are specially designed to monitor operations. Monitoring SQL managed instance operations can provide insights on operation parameters and operation steps, and cancel specific operations. Besides operation details and cancel command, this API can be used in automation scripts with multi-resource deployments - based on the progress step, you can kick off some dependent resource deployment.

These are the APIs:

Command Description
Managed Instance Operations - Get Gets a management operation on a SQL managed instance.
Managed Instance Operations - Cancel Cancels the asynchronous operation on the SQL managed instance.
Managed Instance Operations - List By Managed Instance Gets a list of operations performed on the SQL managed instance.

Monitor operations

In the Azure portal, use the SQL managed instance Overview page to monitor SQL managed instance operations.

For example, the Create operation is visible at the start of the creation process on the Overview page:

Screenshot showing SQL managed instance create progress.

Select Ongoing operation to open the Ongoing operation page and view Create or Update operations. You can also Cancel operations from this page as well.

Screenshot showing SQL managed instance operation details.

Note

Create operations submitted through Azure portal, PowerShell, Azure CLI, or other tooling using REST API version 2020-02-02 can be canceled. REST API versions older than 2020-02-02 used to submit a create operation will start the instance deployment, but the deployment won't be listed in the Operations API and can't be canceled.