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 (for example, db mail, 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.
Because Managed Instance uses the same DNS for its inner workings, configure the custom DNS server so that it can resolve public domain names.
Always use a fully qualified domain name (FQDN) for the mail server, the SQL Server instance, and for other services, even if they're within your private DNS zone. For example, use
smtp.contoso.com for your mail server because
smtp won't resolve correctly. Creating a linked server or replication that references SQL VMs inside the same virtual network also requires an FQDN and a default DNS suffix. For example,
SQLVM.internal.cloudapp.net. For more information, see Name resolution that uses your own DNS server.
Updating virtual network DNS servers won't affect Managed Instance immediately. Managed Instance DNS configuration is updated after the DHCP lease expires or after the platform upgarade, whichever occurs first. Users are advised to set their virtual network DNS configuration before creating their first Managed Instance.