为 Azure SQL 托管实例配置自定义 DNSConfigure a custom DNS for Azure SQL Managed Instance

适用于: Azure SQL 托管实例

Azure SQL 托管实例必须部署在 Azure 虚拟网络 (VNet) 中。Azure SQL Managed Instance must be deployed within an Azure virtual network (VNet). 有几个方案(如数据库邮件,将服务器链接到云或混合环境中的其他 SQL Server 实例)需要从 SQL 托管实例解析专用主机名。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. 在这种情况下,需要在 Azure 中配置自定义 DNS。In this case, you need to configure a custom DNS inside Azure.

由于 SQL 托管实例对内部工作使用同一 DNS,因此需要对自定义 DNS 服务器进行配置,使之能够解析公共域名。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.

重要

始终对邮件服务器、SQL Server 实例和其他服务使用完全限定的域名 (FQDN),即使它们位于专用 DNS 区域内也是如此。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. 例如,请对邮件服务器使用 smtp.contoso.com,因为 smtp 无法正确解析。For example, use smtp.contoso.com for your mail server because smtp won't resolve correctly. 创建引用同一虚拟网络中的 SQL Server VM 的链接服务器或复制也需要 FQDN 和默认 DNS 后缀。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. 例如,SQLVM.internal.chinacloudapp.cnFor example, SQLVM.internal.chinacloudapp.cn. 有关详细信息,请参阅使用自己的 DNS 服务器的名称解析For more information, see Name resolution that uses your own DNS server.

重要

更新虚拟网络 DNS 服务器不会立即影响 SQL 托管实例。Updating virtual network DNS servers won't affect SQL Managed Instance immediately. SQL 托管实例 DNS 配置会在 DHCP 租约到期后或平台升级后进行更新,具体取决于哪一项先发生。The SQL Managed Instance DNS configuration is updated after the DHCP lease expires or after the platform upgrade, whichever occurs first. 建议用户在创建第一个托管实例之前,先设置其虚拟网络 DNS 配置。Users are advised to set their virtual network DNS configuration before creating their first managed instance.

后续步骤Next steps