Edit

Share via


Deploy a SQL Managed Instance enabled by Azure Arc

Prerequisites

Before you can proceed with the tasks in this article, you need to have the necessary tools. All deployments require the following tools:

  • Azure Data Studio

  • Azure Arc extension for Azure Data Studio

  • Azure CLI (az)

  • arcdata extension for Azure CLI

  • kubectl

    Additional client tools depending your environment. For a more comprehensive list, see Client tools.

In addition to the required tools, to complete the tasks, you need an Azure Arc data controller.

To view available options for the create command for SQL Managed Instance enabled by Azure Arc, use the following command:

az sql mi-arc create --help

To create a SQL Managed Instance enabled by Azure Arc, use az sql mi-arc create.

Note

A ReadWriteMany (RWX) capable storage class needs to be specified for backups. Learn more about access modes

If no storage class is specified for backups, the default storage class in Kubernetes is used. If the default storage class isn't RWX capable, the installation may not succeed.

az sql mi-arc create --name <name> --resource-group <group> -–subscription <subscription>  --custom-location <custom-location> --storage-class-backups <RWX capable storageclass>

Example:

az sql mi-arc create --name sqldemo --resource-group rg -–subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  --custom-location private-location --storage-class-backups mybackups

Note

Names must be fewer than 60 characters in length and conform to DNS naming conventions.

When specifying memory allocation and vCore allocation, use this formula to ensure your performance is acceptable: For each 1 vCore, plan at least 4GB of RAM of capacity available on the Kubernetes node.

If you want to automate the creation of SQL Managed Instance enabled by Azure Arc and avoid the interactive prompt for the admin password, set the AZDATA_USERNAME and AZDATA_PASSWORD environment variables to the desired username and password before you run the az sql mi-arc create command.

If you created the data controller using AZDATA_USERNAME and AZDATA_PASSWORD in the same terminal session, then the values for AZDATA_USERNAME and AZDATA_PASSWORD will be used to create the SQL Managed Instance enabled by Azure Arc too.

View instance on Azure Arc

To view the instance, use the following command:

az sql mi-arc list --k8s-namespace <namespace> --use-k8s

Copy the external IP and port number from the result. Use the external IP address to connect to the instance.

At this time, use the insiders build of Azure Data Studio.