Migrate to Innovate Summit:
Learn how migrating and modernizing to Azure can boost your business's performance, resilience, and security, enabling you to fully embrace AI.Register now
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In this article, learn how Azure SQL Managed Instance resolves private domain names.
Overview
In certain situations, it's necessary for the SQL Server database engine to resolve domain names that don't exist in public DNS records. For example, the following scenarios are likely to involve private domain names:
When you change a virtual network's DNS server from Azure to custom or vice versa, SQL Managed Instances in that virtual network must also be notified of the change. This is described in the section Update SQL Managed Instances.
You don't need to do this when you only attach or update Azure private DNS zones to the managed instances' virtual network. Those changes automatically propagate to the managed instances.
Considerations
Be careful not to override or disable the resolution of domain names that Azure SQL Managed Instance uses internally, as listed in Networking constraints. Always configure your custom DNS server so that it can resolve public domain names.
Always use a fully qualified domain name (FQDN) for the services that you want Azure SQL Managed Instance to resolve, such as your mail server or an on-premises SQL Server instance. Use FQDNs even if those services are within your private DNS zone. For example, use smtp.contoso.com. Creating a linked server or configuring replication that reference SQL Server VMs inside the same virtual network also require an FQDN and a default DNS suffix; for example, SQLVM.internal.cloudapp.net.
Update SQL Managed Instances
If the DNS server setting is changed in a virtual network with existing SQL managed instances, then the virtual cluster that hosts those instances, and the underlying machine groups, need to synchronize with the changes in the DNS configuration. Updating a virtual cluster affects all SQL Managed Instances hosted in it.
When you update a virtual cluster's DNS server settings, the custom DNS server IP addresses set on the virtual network become the preferred DNS servers for the instances in that cluster. The instances still retain Azure's DNS resolver address as a backup, but now resolve addresses using the custom DNS servers first.
Open the resource group with a managed instance in the subnet you're configuring, and select the SQL managed instance that you want to update the DNS server settings for.
In Overview, select the Virtual cluster the instance belongs to.
Select Synchronize DNS server settings to update the cluster.
Use Azure PowerShell to update the DNS server settings for an existing virtual cluster.
First, get the virtual network where the DNS settings changed, and then use the Azure PowerShell command Invoke-AzResourceAction to synchronize DNS server configurations for the virtual cluster:
PowerShell
$ResourceGroup = 'enter resource group of virtual network'$VirtualNetworkName = 'enter virtual network name'$virtualNetwork = Get-AzVirtualNetwork -ResourceGroup$ResourceGroup -Name$VirtualNetworkNameGet-AzSqlVirtualCluster `
| where SubnetId -match$virtualNetwork.Id `
| select Id `
| Invoke-AzResourceAction -Action updateManagedInstanceDnsServers -Force
Use the Azure CLI to update the DNS server settings for an existing virtual cluster.
First, get the virtual network where the DNS settings changed, and then use the Azure CLI command az resource invoke-action to synchronize DNS server configurations for the virtual cluster:
Azure CLI
resourceGroup="failover-group"
virtualNetworkName="vnet-fog-eastus"virtualNetwork=$(az network vnet show -g$resourceGroup-n$virtualNetworkName--query"id"-otsv)
az sql virtual-cluster list --query"[? contains(subnetId,'$virtualNetwork')].id"-o tsv \
| az resource invoke-action--action updateManagedInstanceDnsServers --ids @-
Verify the configuration
After you update the DNS server settings on the virtual cluster, you can verify that it's now in effect for the managed instances in that cluster. One way to do so is to create and run a SQL Server Agent job that outputs a list of DNS servers currently configured on the network interface.
To view the list of DNS servers configured on the managed instance's network interface:
Administre una infraestructura de base de datos de SQL Server para bases de datos relacionales locales e híbridas en la nube mediante las ofertas de bases de datos relacionales PaaS de Microsoft.
Obtenga información sobre la arquitectura de comunicación y conectividad de Azure SQL Managed Instance y sobre la forma en la que los componentes dirigen el tráfico de una instancia administrada.
En este artículo se describe cómo configurar una red virtual y una subred existentes en las que se puede implementar Instancia administrada de Azure SQL.
Aprenda cómo mover una instancia de Azure SQL Managed Instance a otra subred con solo un breve tiempo de inactividad durante la conmutación por error ( normalmente de hasta 10 segundos).
Obtenga información sobre la arquitectura del clúster virtual que hospeda Azure SQL Managed Instance, que se basa en un conjunto aislado de máquinas virtuales que forman el clúster.