为 Azure SQL 托管实例创建虚拟网络Create a virtual network for Azure SQL Managed Instance

适用于: Azure SQL 托管实例

本文说明如何创建可在其中部署 Azure SQL 托管实例的有效虚拟网络和子网。This article explains how to create a valid virtual network and subnet where you can deploy Azure SQL Managed Instance.

Azure SQL 托管实例必须部署在 Azure 虚拟网络中。Azure SQL Managed Instance must be deployed within an Azure virtual network. 此部署支持以下方案:This deployment enables the following scenarios:

  • 保护专用 IP 地址Secure private IP address
  • 直接从本地网络连接到 SQL 托管实例Connecting to SQL Managed Instance directly from an on-premises network
  • 将 SQL 托管实例连接到链接服务器或其他本地数据存储Connecting SQL Managed Instance to a linked server or another on-premises data store
  • 将 SQL 托管实例连接到 Azure 资源Connecting SQL Managed Instance to Azure resources

备注

在部署第一个实例之前,应确定 SQL 托管实例的子网大小You should determine the size of the subnet for SQL Managed Instance before you deploy the first instance. 在资源放入子网后,无法调整子网大小。You can't resize the subnet after you put the resources inside.

如果打算使用现有的虚拟网络,则需要修改该网络的配置,以适应 SQL 托管实例。If you plan to use an existing virtual network, you need to modify that network configuration to accommodate SQL Managed Instance. 有关详细信息,请参阅为 SQL 托管实例修改现有的虚拟网络For more information, see Modify an existing virtual network for SQL Managed Instance.

创建托管实例后,不支持将托管实例或虚拟网络移到另一个资源组或订阅。After a managed instance is created, moving the managed instance or virtual network to another resource group or subscription is not supported. 也不支持将托管实例移到另一个子网。Moving the managed instance to another subnet also is not supported.

创建虚拟网络Create a virtual network

创建和配置虚拟网络的最简单方法是使用 Azure 资源管理器部署模板。The easiest way to create and configure a virtual network is to use an Azure Resource Manager deployment template.

  1. 登录到 Azure 门户。Sign in to the Azure portal.

  2. 选择“部署到 Azure”按钮:Select the Deploy to Azure button:

    图像显示标记为“部署到 Azure”的按钮。Image showing a button labeled "Deploy to Azure".

    单击此按钮会打开一个窗体,在其中可以配置用于部署 SQL 托管实例的网络环境。This button opens a form that you can use to configure the network environment where you can deploy SQL Managed Instance.

    备注

    此 Azure 资源管理器模板将部署包含两个子网的虚拟网络。This Azure Resource Manager template will deploy a virtual network with two subnets. 一个名为 ManagedInstances 的子网预留给 SQL 托管实例并且已预配置了路由表。One subnet, called ManagedInstances, is reserved for SQL Managed Instance and has a preconfigured route table. 名为 Default 的另一个子网用于应当访问 SQL 托管实例的其他资源(例如 Azure 虚拟机)。The other subnet, called Default, is used for other resources that should access SQL Managed Instance (for example, Azure Virtual Machines).

  3. 配置网络环境。Configure the network environment. 在以下窗体上,可以配置网络环境的参数:On the following form, you can configure parameters of your network environment:

    用于配置 Azure 网络的资源管理器模板

    可以更改虚拟网络和子网的名称,并调整与网络资源关联的 IP 范围。You might change the names of the virtual network and subnets, and adjust the IP ranges associated with your networking resources. 选择“购买”按钮后,此窗体将创建并配置环境。After you select the Purchase button, this form will create and configure your environment. 如果不需要两个子网,可以删除默认子网。If you don't need two subnets, you can delete the default one.

后续步骤Next steps