快速入門:建立 Azure SQL Database 受控執行個體Quickstart: Create an Azure SQL Database managed instance

本快速入門逐步解說如何在 Azure 入口網站中建立 Azure SQL Database 受控執行個體This quickstart walks you through how to create an Azure SQL Database managed instance in Azure portal.

重要

如需了解限制,請參閱支援的區域支援的訂用帳戶類型For limitations, see Supported regions and Supported subscription types.

登入 Azure 入口網站Sign in to Azure portal

如果您沒有 Azure 訂用帳戶,請建立免費帳戶If you don't have an Azure subscription, create a free account.

登入 Azure 入口網站Sign in to Azure portal.

建立受控執行個體Create a managed instance

下列步驟說明如何建立受控執行個體:The following steps show you how to create a managed instance:

  1. 在 Azure 入口網站的左側功能表上選取 [Azure SQL] 。Select Azure SQL on the left menu of Azure portal. 如果 [Azure SQL] 不在清單中,請選取 [所有服務] ,然後在搜尋方塊中輸入 Azure SQLIf Azure SQL is not in the list, select All services, and then enter Azure SQL in the search box.

  2. 選取 [+ 新增] 以開啟 [選取 SQL 部署選項] 頁面。Select +Add to open the Select SQL deployment option page. 您可以在 [受控執行個體] 圖格上選取 [顯示詳細資料] ,以檢視有關 Azure SQL Database 受控執行個體的其他資訊。You can view additional information about an Azure SQL Database managed instance by selecting Show details on the Managed instances tile.

  3. 選取 [建立] 。Select Create.

    建立受控執行個體

  4. 使用 [建立 Azure SQL Database 受控執行個體] 佈建表單上的索引標籤來新增必要和選用的資訊。Use the tabs on the Create Azure SQL Database Managed Instance provisioning form to add required and optional information. 下列幾節會說明這些索引標籤。The following sections describe these tabs.

基本概念Basics

  • 填寫 [基本] 索引標籤上所需的必要資訊。這是佈建受控執行個體所需的最小一組資訊。Fill out mandatory information required on the Basics tab. This is a minimum set of information required to provision a managed instance.

    用於建立受控執行個體的 [基本] 索引標籤

    使用下表作為此索引標籤上所需資訊的參考。Use the table below as a reference for information required at this tab.

    設定Setting 建議的值Suggested value 說明Description
    訂用帳戶Subscription 您的訂用帳戶。Your subscription. 讓您有權建立新資源的訂用帳戶。A subscription that gives you permission to create new resources.
    資源群組Resource group 新的或現有的資源群組。A new or existing resource group. 如需有效的資源群組名稱,請參閱命名規則和限制For valid resource group names, see Naming rules and restrictions.
    受控執行個體名稱Managed instance name 任何有效名稱。Any valid name. 如需有效的名稱,請參閱命名規則和限制For valid names, see Naming rules and restrictions.
    區域Region 要用來建立受控執行個體的區域。The region in which you want to create the managed instance. 如需區域的相關資訊,請參閱 Azure 區域For information about regions, see Azure regions.
    受控執行個體系統管理員登入Managed instance admin login 任何有效的使用者名稱。Any valid username. 如需有效的名稱,請參閱命名規則和限制For valid names, see Naming rules and restrictions. 請勿使用 "serveradmin",因為這是保留的伺服器層級角色。Don't use "serveradmin" because that's a reserved server-level role.
    密碼Password 任何有效密碼。Any valid password. 密碼長度至少必須有 16 個字元,而且符合定義的複雜度需求The password must be at least 16 characters long and meet the defined complexity requirements.
  • 選取 [設定受控執行個體] 來調整計算和儲存體資源的大小,以及檢閱定價層。Select Configure Managed Instance to size compute and storage resources and to review the pricing tiers. 使用滑桿或文字方塊來指定儲存體容量和虛擬核心數目。Use the sliders or text boxes to specify the amount of storage and the number of virtual cores. 當您完成時,選取 [套用] 來儲存您的選擇。When you're finished, select Apply to save your selection.

    受控執行個體表單

  • 若要在建立受控執行個體前檢閱您的選擇,您可以選取 [檢閱 + 建立] 。To review your choices before you create a managed instance, you can select Review + create. 或者,設定網路選項,做法是選取 [下一步: 網路]。Or, configure networking options by selecting Next: Networking.

網路功能Networking

  • 在 [網路] 索引標籤上填寫選用資訊。如果您省略此資訊,入口網站將會套用預設設定。Fill out optional information on the Networking tab. If you omit this information, the portal will apply default settings.

    用於建立受控執行個體的 [網路] 索引標籤

    使用下表作為此索引標籤上所需資訊的參考。Use the table below as a reference for information required at this tab.

    設定Setting 建議的值Suggested value 說明Description
    虛擬網路Virtual network 選取 [建立新的虛擬網路] 或有效的虛擬網路與子網路。Select either Create new virtual network or a valid virtual network and subnet. 如果網路或子網路無法使用,您必須先修改成符合網路需求後,才能選取它作為新的受控執行個體目標。If a network or subnet is unavailable, it must be modified to satisfy the network requirements before you select it as a target for the new managed instance. 如需關於設定受控執行個體網路環境的需求資訊,請參閱設定受控執行個體的虛擬網路For information about the requirements for configuring the network environment for a managed instance, see Configure a virtual network for a managed instance.
    連線類型Connection type 在 Proxy 和重新導向連線類型之間做選擇。Choose between a proxy and a redirect connection type. 如需有關連線類型的詳細資訊,請參閱 Azure SQL Database 連線原則For more information about connection types, see Azure SQL Database connection policy.
    公用端點Public endpoint 選取 [啟用] 。Select Enable. 若要讓受控執行個體可透過公用資料端點來存取,您必須啟用此選項。For a managed instance to be accessible through the public data endpoint, you need to enable this option.
    允許從此存取 (如果已啟用 [公用雲端] )Allow access from (if Public endpoint is enabled) 選取其中一個選項。Select one of the options. 入口網站體驗可讓您對公用端點設定安全性群組。The portal experience enables configuring a security group with a public endpoint.

    根據您的情況,選取下列其中一個選項:Based on your scenario, select one of the following options:
    • Azure 服務:當您從 Power BI 或其他多租用戶服務進行連線時,建議使用此選項。Azure services: We recommend this option when you're connecting from Power BI or another multitenant service.
    • 網際網路:可在您想要快速啟動受控執行個體時用於測試目的。Internet: Use for test purposes when you want to quickly spin up a managed instance. 請勿將其用於生產環境。We don't recommend it for production environments.
    • 無存取權:此選項會建立 [拒絕] 安全性規則。No access: This option creates a Deny security rule. 修改這項規則,讓受控執行個體可透過公用端點來存取。Modify this rule to make a managed instance accessible through a public endpoint.

    如需公用端點安全性的詳細資訊,請參閱搭配公用端點來安全地使用 Azure SQL Database 受控執行個體For more information on public endpoint security, see Using an Azure SQL Database managed instance securely with a public endpoint.
  • 選取 [檢閱 + 建立] ,以在建立受控執行個體前檢閱您的選擇。Select Review + create to review your choices before you create a managed instance. 或者,設定更多自訂設定,做法是選取 [下一步: 其他設定]。Or, configure more custom settings by selecting Next: Additional settings.

其他設定Additional settings

  • 在 [其他設定] 索引標籤上填寫選用資訊。如果您省略此資訊,入口網站將會套用預設設定。Fill out optional information on the Additional settings tab. If you omit this information, the portal will apply default settings.

    用於建立受控執行個體的 [其他設定] 索引標籤

    使用下表作為此索引標籤上所需資訊的參考。Use the table below as a reference for information required at this tab.

    設定Setting 建議的值Suggested value 說明Description
    定序Collation 選擇您要用於受控執行個體的定序。Choose the collation that you want to use for your managed instance. 如果您從 SQL Server 遷移資料庫,請使用 SELECT SERVERPROPERTY(N'Collation') 來檢查來源定序並使用該值。If you migrate databases from SQL Server, check the source collation by using SELECT SERVERPROPERTY(N'Collation') and use that value. 如需定序的相關資訊,請參閱設定或變更伺服器定序For information about collations, see Set or change the server collation.
    時區Time zone 選取受控執行個體將要觀察的時區。Select the time zone that your managed instance will observe. 如需詳細資訊,請參閱時區For more information, see Time zones.
    作為次要容錯移轉群組Use as failover secondary 選取 [是] 。Select Yes. 啟用此選項以使用受控執行個體作為次要容錯移轉群組。Enable this option to use the managed instance as a failover group secondary.
    主要受控執行個體 (如果 [作為次要容錯移轉群組] 設定為 [是] )Primary managed instance (if Use as failover secondary is set to Yes) 選擇現有主要受控執行個體,其將加入與您所建立受控執行個體相同的 DNS 區域中。Choose an existing primary managed instance that will be joined in the same DNS zone with the managed instance you're creating. 此步驟會啟用容錯移轉群組的建立後設定。This step will enable post-creation configuration of the failover group. 如需詳細資訊,請參閱教學課程:將 SQL Database 受控執行個體新增至容錯移轉群組For more information, see Tutorial: Add a SQL Database managed instance to a failover group.

檢閱 + 建立Review + create

  1. 選取 [檢閱 + 建立] 索引標籤,以在建立受控執行個體前檢閱您的選擇。Select Review + create tab to review your choices before you create the managed instance.

    用於檢閱和建立受控執行個體的索引標籤

  2. 選取 [建立] 以開始佈建受控執行個體。Select Create to start provisioning the managed instance.

重要

部署受控執行個體是長時間執行的作業。Deploying a managed instance is a long-running operation. 在子網路中部署第一個執行個體,所需時間通常比部署到具有現有受控執行個體的子網路還要久。Deployment of the first instance in the subnet typically takes much longer than deploying into a subnet with existing managed instances. 如需平均佈建時間,請參閱受控執行個體管理作業For average provisioning times, see Managed instance management operations.

監視部署進度Monitor deployment progress

  1. 選取 [通知] 圖示以檢視部署的狀態。Select the Notifications icon to view the status of the deployment.

    受控執行個體部署的部署進度

  2. 選取通知中的 [部署正在進行中] 來開啟受控執行個體視窗,並進一步監視部署進度。Select Deployment in progress in the notification to open the managed instance window and further monitor the deployment progress.

提示

如果您關閉了網頁瀏覽器或移出部署進度畫面,請遵循下列步驟來找回部署進度畫面:If you closed your web browser or moved away from the deployment progress screen, follow these steps to locate back the deployment progress screen:

  1. 在 Azure 入口網站中,開啟您要在其中部署受控執行個體的資源群組 (在 [基本] 索引標籤上)。In Azure portal, open the resource group (on the Basics tab) to which you're deploying a managed instance.
  2. 選取 [部署] 。Select Deployments.
  3. 選取進行中的受控執行個體部署作業。Select the managed instance deployment operation in progress.

部署後作業Post-deployment operations

若要審查所建立的資源,請微調網路設定,並遵循本節所述的步驟來擷取主機連線詳細資料 (FQDN)。To review resources created, fine-tune network settings, and retrieve host connection details (FQDN) follow steps described in this section.

檢視已建立的資源View resources created

在受控執行個體部署成功時,若要查看所建立的資源:Upon successful deployment of managed instance, to view resources created:

  1. 開啟受控執行個體的資源群組。Open the resource group for your managed instance. 檢視其在建立受控執行個體快速入門中為您所建立的資源。View its resources that were created for you in the Create a managed instance quickstart.

    受控執行個體資源

查看及微調網路設定View and fine-tune network settings

若要選擇性地微調網路設定,請檢查下列各項:To optionally fine-tune networking settings, inspect the following:

  1. 選取路由表以檢閱為您建立的使用者定義路由 (UDR)。Select the route table to review the user-defined route (UDR) that was created for you.

    路由表

  2. 在路由表中,檢閱要從受控執行個體虛擬網路路由傳送流量的項目。In the route table, review the entries to route traffic from and within the managed instance's virtual network. 如果您要手動建立或設定路由表,務必在受控執行個體路由表中建立這些項目。If you create or configure your route table manually, ensure to create these entries in the managed instance route table.

    受控執行個體子網路到本機的項目

  3. 回到資源群組,然後選取網路安全性群組。Return to the resource group, and select the network security group.

    網路安全性群組

  4. 檢閱輸入和輸出安全性規則。Review the inbound and outbound security rules.

    安全性規則

重要

如果您已為受控執行個體設定公用端點,則必須開啟連接埠以允許從公用網際網路連線到受控執行個體的網路流量,請參閱 設定受控執行個體的公用端點以取得詳細資訊。If you have configured public endpoint for your managed instance, you need to open ports to allow network traffic allowing connections to managed instance from the public Internet, see Configure a public endpoint for managed instance for more information.

擷取受控執行個體的連線詳細資料Retrieve connection details to managed instance

若要連線到受控執行個體,請遵循下列步驟來擷取主機名稱和完整網域名稱 (FQDN):To connect to managed instance, follow these steps to retrieve host name and fully qualified domain name (FQDN):

  1. 回到資源群組,然後選取您的受控執行個體。Return to the resource group and select your managed instance.

    資源群組中的受控執行個體

  2. 在 [概觀] 索引標籤上,找出 [主機] 屬性。On the Overview tab, locate the Host property. 複製受控執行個體的主機名稱,以便在下一個快速入門中使用。Copy the host name for the managed instance for use in the next quickstart.

    主機名稱

    所複製的值代表可用於連線至受控執行個體的完整網域名稱 (FQDN)。The value copied represents a fully qualified domain name (FQDN) that can be used to connect to managed instance. 其類似於下列位址範例:your_host_name.a1b2c3d4e5f6.database.windows.netIt is similar to the following address example: your_host_name.a1b2c3d4e5f6.database.windows.net.

後續步驟Next steps

若要了解如何連線至受控執行個體:To learn about how to connect to a managed instance:

若要將現有 SQL Server 資料庫從內部部署環境還原至受控執行個體:To restore an existing SQL Server database from on-premises to a managed instance:

若要使用內建的疑難排解智慧對受控執行個體的資料庫效能進行進階監視,請參閱使用 Azure SQL 分析監視 Azure SQL DatabaseFor advanced monitoring of managed instance database performance with built-in troubleshooting intelligence, see Monitor Azure SQL Database by using Azure SQL Analytics.