Upgrade Azure SQL Managed Instance directly connected Azure Arc using the portal

This article describes how to upgrade Azure SQL Managed Instance deployed on a directly connected Azure Arc-enabled data controller using the portal.

Limitations

The Azure Arc data controller must be upgraded to the new version before the managed instance can be upgraded.

If Active Directory integration is enabled then Active Directory connector must be upgraded to the new version before the managed instance can be upgraded.

The managed instance must be at the same version as the data controller and active directory connector before a data controller is upgraded.

There's no batch upgrade process available at this time.

Upgrade the managed instance

General Purpose

During a SQL Managed Instance General Purpose upgrade, the pod will be terminated and reprovisioned at the new version. This will cause a short amount of downtime as the new pod is created. You will need to build resiliency into your application, such as connection retry logic, to ensure minimal disruption. Read Overview of the reliability pillar for more information on architecting resiliency and retry guidance for Azure Services.

Business Critical

During a SQL Managed Instance Business Critical upgrade with more than one replica:

  • The secondary replica pods are terminated and reprovisioned at the new version
  • After the replicas are upgraded, the primary will fail over to an upgraded replica
  • The previous primary pod is terminated and reprovisioned at the new version, and becomes a secondary

There is a brief moment of downtime when the failover occurs.

Upgrade

Open your SQL Managed Instance - Azure Arc resource.

Under Settings, select the Upgrade Management.

In the table of available versions, choose the version you want to upgrade to and select Upgrade Now.

In the confirmation dialog box, select Upgrade.

Monitor the upgrade status

To view the status of your upgrade in the portal, go to the resource group of the SQL Managed Instance and select Activity log.

A Validate Deploy option that shows the status.

Troubleshooting

When the desired version is set to a specific version, the bootstrapper job will attempt to upgrade to that version until it succeeds. If the upgrade is successful, the RunningVersion property of the spec is updated to the new version. Upgrades could fail for scenarios such as an incorrect image tag, unable to connect to registry or repository, insufficient CPU or memory allocated to the containers, or insufficient storage.

  1. Run the below command to see if any of the pods show an Error status or have high number of restarts:

    kubectl get pods --namespace <namespace>
    
  2. To look at Events to see if there is an error, run

    kubectl describe pod <pod name> --namespace <namespace>
    
  3. To get a list of the containers in the pods, run

    kubectl get pods <pod name> --namespace <namespace> -o jsonpath='{.spec.containers[*].name}*'
    
  4. To get the logs for a container, run

    kubectl logs <pod name> <container name> --namespace <namespace>
    

To view common errors and how to troubleshoot them go to Troubleshooting resources.