Configure a custom DNS for Azure SQL Managed Instance
Azure SQL 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 Server instances in your cloud or hybrid environment) that require private host names to be resolved from SQL Managed Instance. In this case, you need to configure a custom DNS inside Azure.
Because SQL 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, for 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 Server 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 SQL Managed Instance immediately. The SQL Managed Instance DNS configuration is updated after the DHCP lease expires or after the platform upgrade, whichever occurs first. Users are advised to set their virtual network DNS configuration before creating their first managed instance.