Migrate to Innovate Summit:
Learn how migrating and modernizing to Azure can boost your business's performance, resilience, and security, enabling you to fully embrace AI.Register now
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Quickstart: Create an Azure SQL Managed Instance using an ARM template
Article
This quickstart focuses on the process of deploying an Azure Resource Manager template (ARM template) to create an Azure SQL Managed Instance and vNet. Azure SQL Managed Instance is an intelligent, fully managed, scalable cloud database, with almost 100% feature parity with the SQL Server database engine.
An ARM template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax. In declarative syntax, you describe your intended deployment without writing the sequence of programming commands to create the deployment.
If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to Azure button. The template will open in the Azure portal.
Prerequisites
An Azure subscription. If you don't have an Azure subscription, create a free account
If provisioning in a subnet that is already delegated to Azure SQL Managed Instance, your user only needs the Microsoft.Sql/managedInstances/write permission assigned at subscription scope.
Select Try it from the following PowerShell code block to open Azure Cloud Shell.
Important
Deploying a managed instance is a long-running operation. Deployment of the first instance in the subnet typically takes much longer than deploying into a subnet with existing managed instances. For average provisioning times, see SQL Managed Instance management operations.
$projectName = Read-Host -Prompt"Enter a project name that is used for generating resource names"$location = Read-Host -Prompt"Enter the location (i.e. centralus)"$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.sql/sqlmi-new-vnet/azuredeploy.json"$resourceGroupName = "${projectName}rg"New-AzResourceGroup -Name$resourceGroupName -Location$locationNew-AzResourceGroupDeployment -ResourceGroupName$resourceGroupName -TemplateUri$templateUriRead-Host -Prompt"Press [ENTER] to continue ..."
Azure CLI
read -p"Enter a project name that is used for generating resource names:" projectName &&
read -p"Enter the location (i.e. centralus):" location &&
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.sql/sqlmi-new-vnet/azuredeploy.json" &&
resourceGroupName="${projectName}rg" &&
az group create --name$resourceGroupName--location"$location" &&
az deployment group create --resource-group$resourceGroupName--template-uri$templateUri &&
echo "Press [ENTER] to continue ..." &&
read
Review deployed resources
Visit the Azure portal and verify the managed instance is in your selected resource group. Because creating a managed instance can take some time, you might need to check the Deployments link on your resource group's Overview page.
For a quickstart that shows how to connect to SQL Managed Instance from an on-premises client computer by using a point-to-site connection, see Configure a point-to-site connection.
Clean up resources
Keep the managed instance if you want to go to the Next steps, but delete the managed instance and related resources after completing any additional tutorials. After deleting a managed instance, see Delete a subnet after deleting a managed instance.
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Learn how to create instance pools for Azure SQL Managed Instance, a feature that lets you share resources for multiple instances, and provides a convenient and cost-efficient way to migrate smaller SQL Server databases to the cloud at scale. Create your instance pool by using the Azure portal, PowerShell, or the Azure CLI.
Overview of customer managed keys (CMK) support for transparent data encryption (TDE) with Azure Key Vault for Azure SQL Database at a database level granularity.