0
votes

Azure SQL database - Managed Instance must be placed in Azure VNet in dedicated subnet within the VNet. There are some special requirements that VNet and subnet must satisfy that are described here: https://medium.com/azure-sqldb-managed-instance/the-ultimate-guide-for-creating-and-configuring-azure-sql-managed-instance-environment-91ff58c0be01

What is the easiest way to check is the existing Azure VNet/subnet configured according the requirements and to fix issues/configure VNet/subnet in order to deploy Managed Instance in the existing VNet/subnet?

1
copy\paste documentation day?4c74356b41
There are some concrete questions that are not easily discoverable in the official documentation, and also some people prefer to search for an answer on stack-overflow instead of browsing documentation toc and reading all documentation. I'm adding here some questions that people are asking although they are documented, hoping that thye will more easily find the answer.Jovan MSFT
yeah sure, a great service4c74356b41

1 Answers

1
votes

In Azure docs is described how to configure existing VNet/subnet to deploy Managed Instances in them - see https://docs.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-configure-vnet-subnet

You should use the following script and put subscription id, VNet and subnet names:

scriptUrlBase = 'https://raw.githubusercontent.com/Microsoft/sql-server-samples/master/samples/manage/azure-sql-db-managed-instance/prepare-subnet'

$parameters = @{
    subscriptionId = '<subscriptionId>'
    resourceGroupName = '<resourceGroupName>'
    virtualNetworkName = '<virtualNetworkName>'
    subnetName = '<subnetName>'
    }

Invoke-Command -ScriptBlock ([Scriptblock]::Create((iwr ($scriptUrlBase+'/prepareSubnet.ps1?t='+ [DateTime]::Now.Ticks)).Content)) -ArgumentList $parameters

Script has the following steps:

  • Validate - Selected virtual network and subnet are validated for Managed Instance networking requirements
  • Reports & confirm - Script shows a set of changes that need to be made to prepare subnet for Managed Instance deployment and asked for consent
  • Prepare - Virtual network and subnet are modified by the script and configured properly.