First published on MSDN on May 23, 2018
Azure SQL Managed Instance is fully managed SQL Server Database Engine hosted in Azure cloud. Azure SQL Managed Instance allows you to easily change instance settings such as changing number of cores assigned to the instance, adding more storage, etc. In this post you will see how easily you can automate these operations using ARM templates.
You can also use these templates to update the properties of the existing instance. You should create the following JSON definition and save it as a local file:
/* put the properties that should be updated here */
You should put the properties that you want to change in the properties object. An examples of properties that can be used to change the storage size and the number of cores in the instance is shown here:
You can also change tags assigned to the instance, instead of properties - see
definition of ARM template here
. Note that you cannot change SKU(for example, change the generation) and VNET where the instance is placed.
Once you prepare JSON definition, you can submit the deployment request to Azure.
Submitting deployment requests
You need to have PowerShell libraries to submit ARM request to Azure. In order to execute ARM request, you would need to
install Azure RM PowerShell
. In most of the cases the following three commands might install everything that you need:
Install-Module PowerShellGet -Force
Install-Module -Name AzureRM -AllowClobber
Then, you need to run something like the following PowerShell script :
In this script you need to put your
where you want to deploy changes. This script will ask you to connect to your Azure account and deploy the changes defined in
into your resource group. The only parameter needed in this command is existing resource group where you want to deploy the changes.