The prerequisite for this sample is to prepare Azure resource group , Virtual Network and subnet where the Managed Instance will be created using the instructions described here . The easiest way to setup environment is to use ARM template deployment as described in this post .
Make sure that you set the subscription that you will use using something like the following command:
Replace the value
with your subscription id.
The command az sql mi create will create a new Managed Instance:
In this command you need to specify the name of new managed instance (-n), admin username(-u) and password(-p), resource group where it should be placed (-g), location(data center) where the instance will be placed (-l), and VNet/subnet where the instance will be configured.
If the command succeeds, you will see the properties of the created Managed Instance in the output as JSON text. Note that newly created Managed Instance will not be shown in the Azure deployments.
You can also specify the following properties of new Managed Instance in this command:
-cnumber of cores that will be assigned to the instance.
--storagestorage size expressed in GB
--license-type– that can be BasePrice or LicenseIncluded
--tier– GeneralPurpose or BusinessCritical
--family– hardware family that can be Gen4 or Gen
A command that specifies all these properties is shown in the following example:
When this command finishes, yo can get the details of the created intance using the following command:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.