Configuring a Custom DNS for Azure SQL Database Managed Instance

An Azure SQL Database Managed Instance must be deployed within an Azure virtual network (VNet). There are a few scenarios (i.e. linked servers to other SQL instances in your cloud or hybrid environment) that require private host names to be resolved from the Managed Instance. In this case, you need to configure a custom DNS inside Azure. Since Managed Instance uses the same DNS for its inner workings, the virtual network DNS configuration needs to be compatible with Managed Instance.

To make a custom DNS configuration is compatible with the Managed Instance, you need to:

  • Configure custom DNS server so it is able to resolve public domain names
  • Put Azure Recursive Resolver DNS IP address 168.63.129.16 at the end of the virtual network DNS list

Setting up custom DNS servers configuration

  1. In the Azure portal, find custom DNS option for your VNet.

    custom dns option

  2. Switch to Custom and enter your custom DNS server IP address as well as Azure's recursive resolvers IP address 168.63.129.16.

    custom dns option

    Important

    Not setting Azure’s recursive resolver in DNS list causes the Managed Instance to enter faulty state. Recovering from that state may require you to create new instance in a VNet with the compliant networking policies, create instance level data, and restore your databases. See VNet Configuration.

Next steps