教學課程:使用 DMS 在離線狀態下將 SQL Server 移轉至 Azure SQL DatabaseTutorial: Migrate SQL Server to Azure SQL Database offline using DMS

您可以使用 Azure 資料庫移轉服務,將資料庫從 SQL Server 執行個體遷移至 Azure SQL DatabaseYou can use Azure Database Migration Service to migrate the databases from a SQL Server instance to Azure SQL Database. 在本教學課程中,您會使用 Azure 資料庫移轉服務,將已還原至 SQL Server 2016 (或更新版本) 內部部署執行個體的 Adventureworks2016 資料庫遷移至 Azure SQL Database 中的單一資料庫或集區資料庫。In this tutorial, you migrate the Adventureworks2016 database restored to an on-premises instance of SQL Server 2016 (or later) to a single database or pooled database in Azure SQL Database by using Azure Database Migration Service.

您將了解如何:You will learn how to:

  • 使用 Data Migration Assistant 評估您的內部部署資料庫是否有任何執行問題。Assess and evaluate your on-premises database for any blocking issues by using the Data Migration Assistant.
  • 使用 Data Migration Assistant 來遷移資料庫範例結構描述。Use the Data Migration Assistant to migrate the database sample schema.
  • 註冊 Azure DataMigration 資源提供者。Register the Azure DataMigration resource provider.
  • 建立 Azure 資料庫移轉服務的執行個體。Create an instance of Azure Database Migration Service.
  • 使用 Azure 資料庫移轉服務來建立移轉專案。Create a migration project by using Azure Database Migration Service.
  • 執行移轉。Run the migration.
  • 監視移轉。Monitor the migration.

提示

當您使用 Azure 資料庫移轉服務將資料庫遷移至 Azure 時,您可以進行「離線」或「線上」移轉。When you migrate databases to Azure by using Azure Database Migration Service, you can do an offline or an online migration. 若使用離線移轉,當移轉開始時,應用程式也會開始停機。With an offline migration, application downtime starts when the migration starts. 若使用線上移轉,則只會在移轉結束時於完全移轉期間停機。With an online migration, downtime is limited to the time to cut over at the end of migration. 建議您先測試離線移轉來決定停機時間是否在容忍範圍內;如果無法容忍,則請進行線上移轉。We suggest that you test an offline migration to determine whether the downtime is acceptable; if not, do an online migration.

本文將說明如何在離線狀態下從 SQL Server 移轉至 Azure SQL Database 中的資料庫。This article describes an offline migration from SQL Server to a database in Azure SQL Database. 如需有關線上移轉的資訊,請參閱使用 DMS 在線上將 SQL Server 移轉至 Azure SQL DatabaseFor an online migration, see Migrate SQL Server to Azure SQL Database online using DMS.

PrerequisitesPrerequisites

若要完成本教學課程,您需要:To complete this tutorial, you need to:

  • 下載並安裝 SQL Server 2016 或更新版本Download and install SQL Server 2016 or later.

  • 啟用 TCP/IP 通訊協定,在 SQL Server Express 安裝期間預設會停用,方法是遵循啟用或停用伺服器網路通訊協定一文中的指示。Enable the TCP/IP protocol, which is disabled by default during SQL Server Express installation, by following the instructions in the article Enable or Disable a Server Network Protocol.

  • 依照使用 Azure 入口網站在 Azure SQL Database 中建立資料庫一文中的詳細資料,在 Azure SQL Database 中建立資料庫。Create a database in Azure SQL Database, which you do by following the details in the article Create a database in Azure SQL Database using the Azure portal. 基於本教學課程的目的,Azure SQL Database 的名稱會假設為 AdventureWorksAzure,但您可以命名為不同的名稱。For purposes of this tutorial, the name of the Azure SQL Database is assumed to be AdventureWorksAzure, but you can provide whatever name you wish.

    注意

    如果您使用 SQL Server Integration Services (SSIS),而且想要將 SSIS 專案/套件 (SSISDB) 的目錄資料庫從 SQL Server 遷移到 Azure SQL Database,當您在 Azure Data Factory (ADF) 中佈建 SSIS 時,系統會自動代替您建立及管理目的地 SSISDB。If you use SQL Server Integration Services (SSIS) and want to migrate the catalog database for your SSIS projects/packages (SSISDB) from SQL Server to Azure SQL Database, the destination SSISDB will be created and managed automatically on your behalf when you provision SSIS in Azure Data Factory (ADF). 如需有關遷移 SSIS 套件的詳細資訊,請參閱將 SQL Server Integration Services 套件遷移到 Azure 一文。For more information about migrating SSIS packages, see the article Migrate SQL Server Integration Services packages to Azure.

  • 下載並安裝最新版本的 Data Migration AssistantDownload and install the latest version of the Data Migration Assistant.

  • 使用 Azure Resource Manager 部署模型建立 Azure 資料庫移轉服務的 Microsoft Azure 虛擬網路,以使用 ExpressRouteVPN 為您的內部部署來源伺服器提供站對站連線能力。Create a Microsoft Azure Virtual Network for Azure Database Migration Service by using the Azure Resource Manager deployment model, which provides site-to-site connectivity to your on-premises source servers by using either ExpressRoute or VPN. 如需建立虛擬網路的詳細資訊,請參閱虛擬網路文件,特別是快速入門文章,裡面會提供逐步操作詳細資料。For more information about creating a virtual network, see the Virtual Network Documentation, and especially the quickstart articles with step-by-step details.

    注意

    在虛擬網路設定期間,如果您使用 ExpressRoute 搭配與 Microsoft 對等互連的網路,請將下列服務端點新增至將佈建服務的子網路:During virtual network setup, if you use ExpressRoute with network peering to Microsoft, add the following service endpoints to the subnet in which the service will be provisioned:

    • 目標資料庫端點 (例如,SQL 端點、Cosmos DB 端點等)Target database endpoint (for example, SQL endpoint, Cosmos DB endpoint, and so on)
    • 儲存體端點Storage endpoint
    • 服務匯流排端點Service bus endpoint

    此為必要設定,因為 Azure 資料庫移轉服務沒有網際網路連線。This configuration is necessary because Azure Database Migration Service lacks internet connectivity.

    如果您沒有內部部署網路與 Azure 之間的站對站連線,或是您的站對站連線頻寬有限,請考慮在混合模式 (預覽) 中使用 Azure 資料庫移轉服務。If you don’t have site-to-site connectivity between the on-premises network and Azure or if there is limited site-to-site connectivity bandwidth, consider using Azure Database Migration Service in hybrid mode (Preview). 混合模式會搭配使用內部部署移轉背景工作角色與雲端中執行的 Azure 資料庫移轉服務執行個體。Hybrid mode leverages an on-premises migration worker together with an instance of Azure Database Migration Service running in the cloud. 若要在混合模式中建立 Azure 資料庫移轉服務的執行個體,請參閱使用 Azure 入口網站在混合模式中建立 Azure 資料庫移轉服務執行個體一文。To create an instance of Azure Database Migration Service in hybrid mode, see the article Create an instance of Azure Database Migration Service in hybrid mode using the Azure portal.

  • 確定您的虛擬網路網路安全性群組輸出安全性規則不會封鎖 ServiceTag 的輸出埠443,以進行系統匯流排、儲存體和 AzureMonitor。Ensure that your virtual network Network Security Group outbound security rules don't block the outbound port 443 of ServiceTag for ServiceBus, Storage and AzureMonitor. 如需 Azure 虛擬網路 NSG 流量篩選的詳細資訊,請參閱使用網路安全性群組來篩選網路流量For more detail on Azure virtual network NSG traffic filtering, see the article Filter network traffic with network security groups.

  • 設定用於 Database Engine 存取的 Windows 防火牆Configure your Windows Firewall for database engine access.

  • 開啟您的 Windows 防火牆以允許 Azure 資料庫移轉服務存取來源 SQL Server (依預設會使用 TCP 連接埠 1433)。Open your Windows firewall to allow Azure Database Migration Service to access the source SQL Server, which by default is TCP port 1433. 如果您的預設執行個體正在其他連接埠上接聽,請將其新增至防火牆。If your default instance is listening on some other port, add that to the firewall.

  • 如果您使用動態連接埠執行多個具名 SQL Server 執行個體,您可以啟用 SQL Browser 服務並允許通過防火牆存取 UDP 連接埠 1434,讓 Azure 資料庫移轉服務連線來源伺服器上的具名執行個體。If you're running multiple named SQL Server instances using dynamic ports, you may wish to enable the SQL Browser Service and allow access to UDP port 1434 through your firewalls so that Azure Database Migration Service can connect to a named instance on your source server.

  • 使用來源資料庫前面的防火牆應用裝置時,您可能必須新增防火牆規則,才能讓 Azure 資料庫移轉服務存取來源資料庫,以進行移轉。When using a firewall appliance in front of your source database(s), you may need to add firewall rules to allow Azure Database Migration Service to access the source database(s) for migration.

  • 為 Azure SQL Database 建立伺服器層級 IP 防火牆規則,以允許 Azure 資料庫移轉服務存取目標資料庫。Create a server-level IP firewall rule for Azure SQL Database to allow Azure Database Migration Service access to the target databases. 提供用於 Azure 資料庫移轉服務之虛擬網路的子網路範圍。Provide the subnet range of the virtual network used for Azure Database Migration Service.

  • 確定用來連線至來源 SQL Server 執行個體的認證具有 CONTROL SERVER 權限。Ensure that the credentials used to connect to source SQL Server instance have CONTROL SERVER permissions.

  • 確定用來連線至目標 Azure SQL DB 執行個體的認證,在目標資料庫上具有 CONTROL DATABASE 權限。Ensure that the credentials used to connect to target Azure SQL Database instance have CONTROL DATABASE permission on the target databases.

評估您的內部部署資料庫Assess your on-premises database

將資料從 SQL Server 執行個體遷移到 Azure SQL Database 中的單一資料庫或集區資料庫之前,您必須評估 SQL Server 資料庫是否有任何可能會阻礙移轉的問題。Before you can migrate data from a SQL Server instance to a single database or pooled database in Azure SQL Database, you need to assess the SQL Server database for any blocking issues that might prevent migration. 使用 Data Migration Assistant,依照執行 SQL Server 移轉評估一文中所描述的步驟,完成內部部署資料庫評估。Using the Data Migration Assistant, follow the steps described in the article Performing a SQL Server migration assessment to complete the on-premises database assessment. 所需的步驟摘要如下:A summary of the required steps follows:

  1. 在 Data Migration Assistant 中,選取 [New] (新增) (+) 圖示,然後選取 [Assessment] (評估) 專案類型。In the Data Migration Assistant, select the New (+) icon, and then select the Assessment project type.

  2. 指定專案名稱。Specify a project name. 從 [評估類型] 下拉式清單中選取 [資料庫引擎]、在 [來源伺服器類型] 文字方塊中選取 [SQL Server]、在 [目標伺服器類型] 文字方塊中選取 [Azure SQL Database],然後選取 [建立] 來建立專案。From the Assessment type drop down list, select Database Engine, in the Source server type text box, select SQL Server, in the Target server type text box, select Azure SQL Database, and then select Create to create the project.

    當您評估來源 SQL Server 資料庫遷移到 Azure SQL Database 中的單一資料庫或集區資料庫時,可以選擇下列其中一種或兩種評估報告類型:When you're assessing the source SQL Server database migrating to a single database or pooled database in Azure SQL Database, you can choose one or both of the following assessment report types:

    • 檢查資料庫相容性Check database compatibility
    • 檢查功能同位Check feature parity

    預設會選取這兩種報告類型。Both report types are selected by default.

  3. 在 Data Migration Assistant 的 [Options] (選項) 畫面上,選取 [Next] (下一步)。In the Data Migration Assistant, on the Options screen, select Next.

  4. 在 [Select sources] (選取來源) 畫面的 [Connect to a server] (連線到伺服器) 對話方塊中,提供您 SQL Server 的連線詳細資料,然後選取 [Connect] (連線)。On the Select sources screen, in the Connect to a server dialog box, provide the connection details to your SQL Server, and then select Connect.

  5. 在 [新增來源] 對話方塊中,依序選取 [Adventureworks2016]、[新增],然後選取 [開始評估]。In the Add sources dialog box, select Adventureworks2016, select Add, and then select Start Assessment.

    注意

    如果您使用 SSIS,DMA 目前不支援來源 SSISDB 的評估。If you use SSIS, DMA does not currently support the assessment of the source SSISDB. 不過會評估/驗證 SSIS 專案/套件,因為它們會重新部署到 Azure SQL Database 所裝載的目的地 SSISDB。However, SSIS projects/packages will be assessed/validated as they are redeployed to the destination SSISDB hosted by Azure SQL Database. 如需有關遷移 SSIS 套件的詳細資訊,請參閱將 SQL Server Integration Services 套件遷移到 Azure 一文。For more information about migrating SSIS packages, see the article Migrate SQL Server Integration Services packages to Azure.

    評估完成時,結果會如下圖所示:When the assessment is complete, the results display as shown in the following graphic:

    評估資料移轉

    對於 Azure SQL Database 中的資料庫,評估會識別部署至單一資料庫或集區資料庫時的功能同位問題和移轉阻礙問題。For databases in Azure SQL Database, the assessments identify feature parity issues and migration blocking issues for deploying to a single database or pooled database.

    • SQL Server 功能同位 類別提供一組完整的建議、Azure 中可使用的替代方法以及補救步驟,協助您規劃移轉專案所需的時間和精力。The SQL Server feature parity category provides a comprehensive set of recommendations, alternative approaches available in Azure, and mitigating steps to help you plan the effort into your migration projects.
    • 相容性問題 類別則識別反映出相容性問題的部分支援或不支援功能,這些相容性問題可能會阻礙將 SQL Server 資料庫移轉至 Azure SQL Database。The Compatibility issues category identifies partially supported or unsupported features that reflect compatibility issues that might block migrating SQL Server database(s) to Azure SQL Database. 同時也提供協助您解決這些問題的建議。Recommendations are also provided to help you address those issues.
  6. 選取特定的選項,檢閱評估結果是否有阻礙移轉的問題和功能同位問題。Review the assessment results for migration blocking issues and feature parity issues by selecting the specific options.

移轉範例結構描述Migrate the sample schema

當您滿意評估結果,且認為選取的資料庫也適合遷移至 Azure SQL Database 中的單一資料庫或集區資料庫之後,請使用 DMA 將結構描述遷移至 Azure SQL Database。After you're comfortable with the assessment and satisfied that the selected database is a viable candidate for migration to a single database or pooled database in Azure SQL Database, use DMA to migrate the schema to Azure SQL Database.

注意

在 Data Migration Assistant 中建立移轉專案之前,請務必先確認您已經如必要條件中所述在 Azure 中佈建資料庫。Before you create a migration project in Data Migration Assistant, be sure that you have already provisioned a database in Azure as mentioned in the prerequisites.

重要

如果您使用 SSIS,DMA 目前不支援來源 SSISDB 的移轉,但您可以將 SSIS 專案/套件重新部署到 Azure SQL Database 所裝載的目的地 SSISDB。If you use SSIS, DMA does not currently support the migration of source SSISDB, but you can redeploy your SSIS projects/packages to the destination SSISDB hosted by Azure SQL Database. 如需有關遷移 SSIS 套件的詳細資訊,請參閱將 SQL Server Integration Services 套件遷移到 Azure 一文。For more information about migrating SSIS packages, see the article Migrate SQL Server Integration Services packages to Azure.

若要將 Adventureworks2016 結構描述移轉到 Azure SQL Database 中的單一資料庫或集區資料庫,請執行下列步驟:To migrate the Adventureworks2016 schema to a single database or pooled database Azure SQL Database, perform the following steps:

  1. 在資料移轉小幫手中,選取新增 (+) 圖示,然後在 [專案類型] 底下選取 [移轉]。In the Data Migration Assistant, select the New (+) icon, and then under Project type, select Migration.

  2. 在 [Source server type] (來源伺服器類型) 文字方塊中指定專案名稱,選取 [SQL Server],然後在 [Target server type] (目標伺服器類型) 文字方塊中,選取 [Azure SQL Database]。Specify a project name, in the Source server type text box, select SQL Server, and then in the Target server type text box, select Azure SQL Database.

  3. 在 [Migration Scope] (移轉範圍) 下,選取 [Schema only] (僅結構描述)。Under Migration Scope, select Schema only.

    執行先前的步驟之後,Data Migration Assistant 介面應該如下圖所示:After performing the previous steps, the Data Migration Assistant interface should appear as shown in the following graphic:

    建立 Data Migration Assistant 專案

  4. 選取 [Create] (建立) 以建立專案。Select Create to create the project.

  5. 在 Data Migration Assistant 中,為您的 SQL Server 指定來源連線詳細資料,選取 [連線],然後選取 [Adventureworks2016] 資料庫。In the Data Migration Assistant, specify the source connection details for your SQL Server, select Connect, and then select the Adventureworks2016 database.

    Data Migration Assistant 來源連線詳細資料

  6. 在 [連線到目標伺服器] 下方選取 [下一步],指定 Azure SQL 資料庫的目標連線詳細資料、選取 [連線],然後選取您已在 Azure SQL Database 中預先佈建的 [AdventureWorksAzure] 資料庫。Select Next, under Connect to target server, specify the target connection details for the Azure SQL Database, select Connect, and then select the AdventureWorksAzure database you had pre-provisioned in Azure SQL Database.

    Data Migration Assistant 目標連線詳細資料

  7. 選取 [下一步] 前進到 [選取物件] 畫面,您可以指定 Adventureworks2016 資料庫中需要部署至 Azure SQL Database 的結構描述物件。Select Next to advance to the Select objects screen, on which you can specify the schema objects in the Adventureworks2016 database that need to be deployed to Azure SQL Database.

    預設會選取所有物件。By default, all objects are selected.

    產生 SQL 指令碼

  8. 選取 [Generate SQL script] (產生 SQL 指令碼) 來建立 SQL 指令碼,然後檢閱指令碼是否有任何錯誤。Select Generate SQL script to create the SQL scripts, and then review the scripts for any errors.

    結構描述指令碼

  9. 選取 [Deploy schema] (部署結構描述) 以將結構描述部署至 Azure SQL Database,並在結構描述部署好之後,檢查目標伺服器是否有任何異常狀況。Select Deploy schema to deploy the schema to Azure SQL Database, and then after the schema is deployed, check the target server for any anomalies.

    部署結構描述

註冊 Microsoft.DataMigration 資源提供者Register the Microsoft.DataMigration resource provider

  1. 登入 Azure 入口網站。Sign in to the Azure portal. 搜尋並選取 [訂用帳戶]。Search for and select Subscriptions.

    顯示入口網站訂用帳戶

  2. 選取您要在其中建立 Azure 資料庫移轉服務執行個體的訂用帳戶,然後選取 [資源提供者]。Select the subscription in which you want to create the instance of Azure Database Migration Service, and then select Resource providers.

    顯示資源提供者

  3. 搜尋移轉,然後針對 [Microsoft.DataMigration] 選取 [註冊]。Search for migration, and then select Register for Microsoft.DataMigration.

    註冊資源提供者

建立執行個體Create an instance

  1. 從 Azure 入口網站功能表或 [首頁] 頁面上,選取 [建立資源]。In the Azure portal menu or on the Home page, select Create a resource. 搜尋並選取 [Azure 資料庫移轉服務]。Search for and select Azure Database Migration Service.

    Azure Marketplace

  2. 在 [Azure 資料庫移轉服務] 畫面上,選取 [建立]。On the Azure Database Migration Service screen, select Create.

    建立 Azure 資料庫移轉服務執行個體

  3. 在 [建立移轉服務] 的基本資料畫面上:On the Create Migration Service basics screen:

    • 選取訂用帳戶。Select the subscription.
    • 建立新的資源群組,或選擇現有的群組。Create a new resource group or choose an existing one.
    • 指定 Azure 資料庫移轉服務執行個體的名稱。Specify a name for the instance of the Azure Database Migration Service.
    • 選取您要在其中建立 Azure 資料庫移轉服務執行個體的位置。Select the location in which you want to create the instance of Azure Database Migration Service.
    • 選擇 Azure 作為服務模式。Choose Azure as the service mode.
    • 選取定價層。Select a pricing tier. 如需成本和定價層的詳細資訊,請參閱定價分頁For more information on costs and pricing tiers, see the pricing page.

    設定 Azure 資料庫移轉服務執行個體的基本設定

    • 選取 [下一步:網路]Select Next: Networking.
  4. 在 [建立移轉服務] 的網路設定畫面上:On the Create Migration Service networking screen:

    • 選取現有的虛擬網路或建立新的虛擬網路。Select an existing virtual network or create a new one. 虛擬網路會為 Azure 資料庫移轉服務提供來源 SQL Server 和目標 Azure SQL Database 執行個體的存取權。The virtual network provides Azure Database Migration Service with access to the source SQL Server and the target Azure SQL Database instance. 如需如何在 Azure 入口網站中建立虛擬網路的詳細資訊,請參閱使用 Azure 入口網站建立虛擬網路一文。For more information about how to create a virtual network in the Azure portal, see the article Create a virtual network using the Azure portal.

    設定 Azure 資料庫移轉服務執行個體的網路設定

    • 選取 [檢閱 + 建立] 以建立服務。Select Review + Create to create the service.

建立移轉專案Create a migration project

建立服務之後,請在 Azure 入口網站中找出該服務,然後建立新的移轉專案。After the service is created, locate it within the Azure portal, open it, and then create a new migration project.

  1. 在 Azure 入口網站功能表中,選取 [所有服務]。In the Azure portal menu, select All services. 搜尋並選取 [Azure 資料庫移轉服務]。Search for and select Azure Database Migration Services.

    找出 Azure 資料庫移轉服務的所有執行個體

  2. 在 [Azure 資料庫移轉服務] 畫面上,選取您建立的 Azure 資料庫移轉服務執行個體。On the Azure Database Migration Services screen, select the Azure Database Migration Service instance that you created.

  3. 選取 [新增移轉專案]。Select New Migration Project.

    找出 Azure 資料庫移轉服務的執行個體

  4. 在 [新增移轉專案] 畫面上指定專案名稱、在 [來源伺服器類型] 文字方塊中選取 [SQL Server]、在 [目標伺服器類型] 文字方塊中選取 [Azure SQL Database],然後針對 [選擇活動類型],選取 [離線資料移轉]。On the New migration project screen, specify a name for the project, in the Source server type text box, select SQL Server, in the Target server type text box, select Azure SQL Database, and then for Choose type of activity, select Offline data migration.

    建立資料庫移轉服務專案

  5. 選取 [建立及執行活動],以建立專案並執行移轉活動。Select Create and run activity to create the project and run the migration activity.

指定來源詳細資料Specify source details

  1. 在 [選取來源] 畫面上,指定來源 SQL Server 執行個體的連線詳細資料。On the Select source screen, specify the connection details for the source SQL Server instance.

    請務必使用來源 SQL Server 執行個體名稱的完整網域名稱 (FQDN)。Make sure to use a Fully Qualified Domain Name (FQDN) for the source SQL Server instance name. 如果無法解析 DNS 名稱,您也可以使用 IP 位址。You can also use the IP Address for situations in which DNS name resolution isn't possible.

  2. 如果您尚未在來源伺服器上安裝信任的憑證,選取 [信任伺服器憑證] 核取方塊。If you have not installed a trusted certificate on your source server, select the Trust server certificate check box.

    未安裝信任的憑證時,SQL Server 會在執行個體啟動時,產生自我簽署憑證。When a trusted certificate is not installed, SQL Server generates a self-signed certificate when the instance is started. 此憑證用來加密用戶端連線的認證。This certificate is used to encrypt the credentials for client connections.

    警告

    使用自我簽署憑證加密的 TLS 連線不會提供增強式安全性。TLS connections that are encrypted using a self-signed certificate do not provide strong security. 這種連線容易受到攔截式攻擊。They are susceptible to man-in-the-middle attacks. 在生產環境或連線到網際網路的伺服器上,您不應該仰賴使用自我簽署憑證的 TLS。You should not rely on TLS using self-signed certificates in a production environment or on servers that are connected to the internet.

    重要

    如果您使用 SSIS,DMS 目前不支援來源 SSISDB 的移轉,但您可以將 SSIS 專案/套件重新部署到 Azure SQL Database 所裝載的目的地 SSISDB。If you use SSIS, DMS does not currently support the migration of source SSISDB, but you can redeploy your SSIS projects/packages to the destination SSISDB hosted by Azure SQL Database. 如需有關遷移 SSIS 套件的詳細資訊,請參閱將 SQL Server Integration Services 套件遷移到 Azure 一文。For more information about migrating SSIS packages, see the article Migrate SQL Server Integration Services packages to Azure.

    來源詳細資料

  3. 完成時,選取 下一步:選取目標Select Next: Select target.

指定目標詳細資料Specify target details

  1. 在 [選取目標] 畫面上指定目標 Azure SQL Database 的連線詳細資料,此目標是預先佈建的 Azure SQL Database,並且已使用 Data Migration Assistant 將 Adventureworks2016 結構描述部署到其中。On the Select target screen, specify the connection details for the target Azure SQL Database, which is the pre-provisioned Azure SQL Database to which the Adventureworks2016 schema was deployed by using the Data Migration Assistant.

    選取目標

    注意

    除了使用自訂的 DNS 名稱時,Azure 資料庫移轉服務也支援對目標 Azure SQL Database 的私人端點連線。Private endpoint connections to the target Azure SQL Database are supported by the Azure Database Migration Service except when using a custom DNS name.

  2. 完成時,選取 [下一步:對應到目標資料庫] 畫面上,對應要進行移轉的來源資料庫和目標資料庫。Select Next: Map to target databases screen, map the source and the target database for migration.

    如果目標資料庫包含與來源資料庫相同的資料庫名稱,Azure 資料庫移轉服務依預設會選取目標資料庫。If the target database contains the same database name as the source database, Azure Database Migration Service selects the target database by default.

    對應到目標資料庫

  3. 完成時,選取 [下一步:設定移轉設定],展開資料表清單,然後檢閱受影響的欄位清單。Select Next: Configuration migration settings, expand the table listing, and then review the list of affected fields.

    Azure 資料庫移轉服務會自動選取存在於目標 Azure SQL Database 執行個體上的所有空來源資料表。Azure Database Migration Service auto selects all the empty source tables that exist on the target Azure SQL Database instance. 如果您想要重新移轉已包含資料的資料表,就必須在此刀鋒視窗上明確地選取資料表。If you want to remigrate tables that already include data, you need to explicitly select the tables on this blade.

    選取資料表

  4. 完成時,選取 [下一步:摘要] 上檢閱移轉設定,然後在 [活動名稱] 文字方塊中,指定移轉活動的名稱。Select Next: Summary, review the migration configuration and in the Activity name text box, specify a name for the migration activity.

    選擇驗證選項

執行移轉Run the migration

  • 選取 [開始移轉]。Select Start migration.

    [移轉活動] 視窗隨即出現,而且活動的 [狀態] 為 [擱置]。The migration activity window appears, and the Status of the activity is Pending.

    活動狀態

監視移轉Monitor the migration

  1. 在移轉活動畫面上,選取 [重新整理] 以更新顯示,直到移轉的 狀態 顯示為 [已完成] 為止。On the migration activity screen, select Refresh to update the display until the Status of the migration shows as Completed.

    活動狀態已完成

  2. 驗證目標 Azure SQL Database 上的目標資料庫。Verify the target database(s) on the target Azure SQL Database.

其他資源Additional resources