共用方式為


已知問題、限制和疑難排解

本文提供與適用於 Azure Data Studio 的 Azure SQL 移轉延伸模組相關聯的已知問題和疑難排解步驟清單。

重要事項

最新版本的 Integration Runtime (5.28.8488) 會封鎖對本機主機上網路檔案共用的存取。 此安全措施會導致使用 DMS 移轉至 Azure SQL 時失敗。 請確定您在與網路共用主機不同的電腦上執行整合執行階段。

錯誤碼:2007 - CutoverFailedOrCancelled

  • 訊息Cutover failed or cancelled for database <DatabaseName>. Error details: The restore plan is broken because firstLsn <First LSN> of log backup <URL of backup in Azure Storage container>' is not <= lastLsn <last LSN> of Full backup <URL of backup in Azure Storage container>'. Restore to point in time.

  • 原因:可能是因為在 Azure 儲存體容器中不正確放置備份,而發生此錯誤。 如果將備份放在網路檔案共用中,也可能因為網路連線問題而發生此錯誤。

  • 建議:確保 Azure 儲存體容器中的資料庫備份正確無誤。 如果您使用網路檔案共用,網路問題或延遲可能會導致此錯誤。 請等候此流程完成。

  • 訊息Cutover failed or cancelled for database '{databaseName}'. Error details: 'errorCode: Ext_RestoreSettingsError, message: RestoreId: {RestoreId}, OperationId: {operationId}, Detail: Failed to complete restore., RestoreJobState: Restoring, CompleteRestoreErrorMessage: The database contains incompatible physical layout. Too many full text catalog files.

  • 原因:Azure VM 上的 SQL Server 目前不支援使用全文檢索目錄檔案還原資料庫。

  • 建議:建立還原時,請從資料庫中移除全文檢索目錄檔案。

  • 訊息Cutover failed or cancelled for database '{databaseName}'. Error details: 'Migration cannot be completed because provided backup file name '{providedFileName}' should be the last restore backup file '{lastRestoredFileName}'.'

  • 原因:此錯誤是由於 Azure SQL 受控執行個體中的已知限制而發生。 這意味著 {providedFileName}{lastRestoredFileName} 是不同的。 SQL 受控執行個體會根據 LSN 序列自動還原容器中的所有有效備份檔案。 典型的失敗案例可能是:是 {providedFileName}log1,但容器中的檔案有其他檔案,例如 log2,其 LSN 數目大於 log1。 在此情況下,SQL 受控執行個體會自動還原容器中的所有檔案。 在完成移轉結束時,SQL 受控執行個體會報告此錯誤訊息。

  • 建議:針對離線移轉模式,請提供具有最大 LSN 的 「lastBackupName」。 對於線上移轉案例,如果移轉狀態成功,則可以忽略此警告/錯誤。

錯誤碼:2009 - MigrationRestoreFailed

  • 訊息Migration for Database 'DatabaseName' failed with error cannot find server certificate with thumbprint.

  • 原因:移轉資料之前,您必須將來源 SQL Server 執行個體的憑證從受透明資料加密 (TDE) 保護的資料庫移轉至目標 Azure SQL 受控執行個體或 Azure 虛擬機器上的 SQL Server。

  • 建議:將 TDE 憑證移轉至目標執行個體,然後重試此流程。 如需移轉已啟用 TDE 的資料庫的詳細資訊,請參閱教學課程:在 Azure Data Studio 中將已啟用 TDE 的資料庫移轉至 Azure SQL (預覽)

  • 訊息Migration for Database <DatabaseName> failed with error 'Non retriable error occurred while restoring backup with index 1 - 3169'. The database was backed up on a server running version %ls. That version is incompatible with this server, which is running version %ls. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.

  • 原因:無法將 SQL Server 備份還原成比建立備份時的版本還舊的 SQL Server 版本。

  • 建議:如需疑難排解步驟,請參閱影響不同 SQL Server 版本之間資料庫還原的問題 (機器翻譯)。

  • 訊息Migration for Database <DatabaseName> failed with error 'The managed instance has reached its storage limit. The storage usage for the managed instance can't exceed 32768 MBs.'

  • 原因:Azure SQL 受控執行個體已達到其資源限制。

  • 建議:如需儲存體限制的詳細資訊,請參閱 Azure SQL 受控執行個體資源限制概觀

  • 訊息Migration for Database <DatabaseName> failed with error 'Non retriable error occurred while restoring backup with index 1 - 3634' The operating system returned the error '1450(Insufficient system resources exist to complete the requested service.)'

  • 原因:原因可能是在 DBCC CHECKDB 或建立資料庫快照集期間,針對資料庫檔案回報 OS 錯誤 1450 和 665 中列出的其中一個徵兆。

  • 建議:如需疑難排解步驟,請參閱在在 DBCC CHECKDB 或建立資料庫快照集期間,針對資料庫檔案回報 OS 錯誤 1450 和 665 (機器翻譯)。

  • 訊息The restore plan is broken because firstLsn <First LSN> of log backup <URL of backup in Azure Storage container>' isn't <= lastLsn <last LSN> of Full backup <URL of backup in Azure Storage container>'. Restore to point in time.

  • 原因:可能是因為在 Azure 儲存體容器中不正確放置備份,而發生此錯誤。 如果將備份放在網路檔案共用中,也可能因為網路連線問題而發生此錯誤。

  • 建議:請確定 Azure 儲存體容器中的資料庫備份正確無誤。 如果您使用網路檔案共用,網路問題或延遲可能會導致此錯誤。 請等候此流程完成。

  • 訊息Migration for Database <Database Name> failed with error 'Non retriable error occurred while restoring backup with index 1 - 3234' Logical file <Name> isn't part of database <Database GUID>. Use RESTORE FILELISTONLY to list the logical file names. RESTORE DATABASE is terminating abnormally.

  • 原因:您指定的邏輯檔名不在資料庫備份中。 此錯誤的另一個可能原因是儲存體帳戶容器名稱不正確。

  • 建議:執行 RESTORE FILELISTONLY 以檢查備份中的邏輯檔案名稱。 如需 RESTORE FILELISTONLY 的詳細資訊,請參閱 RESTORE 陳述式 - FILELISTONLY (Transact-SQL)

  • 訊息Migration for Database <Database Name> failed with error 'Azure SQL target resource failed to connect to storage account. Make sure the target SQL VNet is allowed under the Azure Storage firewall rules.'

  • 原因:Azure 儲存體防火牆未設定為允許存取 Azure SQL 目標。

  • 建議:如需 Azure 儲存體防火牆設定的詳細資訊,請參閱設定 Azure 儲存體防火牆和虛擬網路

  • 訊息Migration for Database <Database Name> failed with error 'There are backups from multiple databases in the container folder'. Please make sure the container folder has backups from a single database.

  • 原因:多個資料庫的備份位於相同容器資料夾中。

  • 建議:如果使用相同的 Azure Blob 儲存體容器,將多個資料庫移轉至 Azure SQL 受控執行個體,您必須將各個資料庫的備份檔案放在容器內的單獨資料夾中。 如需 LRS 的詳細資訊,請參閱使用記錄轉送服務,將資料庫從 SQL Server 移轉至 SQL 受控執行個體 (預覽)

  • 訊息Migration for Database <Database Name> failed with error 'Non retriable error occurred while restoring backup with index 1 - 12824' The sp_configure value 'contained database authentication' must be set to 1 in order to restore a contained database. You may need to use RECONFIGURE to set the value_in_use. RESTORE DATABASE is terminating abnormally.

  • 原因:來源資料庫是自主資料庫。 需要特定設定,才能啟用還原自主資料庫。 如需自主資料庫的詳細資訊,請參閱自主資料庫使用者

  • 建議:在開始移轉之前,請先在特定資料庫的內容中執行下列連線至來源 SQL Server 的查詢。 然後,再次嘗試移轉自主資料庫。

    -- Enable "contained database authentication"
    EXECUTE sp_configure 'contained', 1;
    
    RECONFIGURE;
    
  • 訊息Migration for Database <Database Name> failed with error 'Managed identity is not set up properly'. Please verify and try again.'

  • 原因:與目標 SQL 受控執行個體相關聯的受控識別沒有必要的許可權/角色,無法存取包含移轉所需備份檔案的 Azure Blob 儲存體。

  • 建議:將 Azure Blob 記憶體帳戶上的「記憶體 Blob 數據讀取者」角色指派給與目標 SQL 受控實例相關聯的受控識別。 如需詳細資訊,請參閱 部落格

    附註

    如需 Azure SQL 受控實例錯誤一般疑難解答步驟的詳細資訊,請參閱 Azure SQL 受控實例的已知問題

錯誤碼:2012 - TestConnectionFailed

  • 訊息Failed to test connections using provided Integration Runtime. Error details: 'Remote name could not be resolved.'

  • 原因:防火牆中的網路設定導致自我裝載整合執行階段無法連線到服務後端。

  • 建議:網域名稱系統 (DNS) 發生問題。 請連絡您的網路小組以修正問題。 如需詳細資訊,請參閱 針對自我裝載整合執行階段進行疑難排解

  • 訊息Failed to test connections using provided Integration Runtime. 'Cannot connect to <File share>. Detail Message: The system could not find the environment option that was entered

  • 原因:自我裝載整合執行階段無法連線到放置資料庫備份的網路檔案共用。

  • 建議:請確認正確輸入您的網路檔案共用名稱。

  • 訊息Failed to test connections using provided Integration Runtime. The file name does not conform to the naming rules by the data store. Illegal characters in path.

  • 原因:自我裝載整合執行階段無法連線到放置資料庫備份的網路檔案共用。

  • 建議:請確認正確輸入您的網路檔案共用名稱。

  • 訊息Failed to test connections using provided Integration Runtime.

  • 原因:連線至自我寄宿整合執行環境失敗。

  • 建議:如需整合執行階段連線錯誤的一般疑難排解步驟,請參閱針對自我裝載整合執行階段進行疑難排解 (部分機器翻譯)。

錯誤碼:2014 - IntegrationRuntimeIsNotOnline

錯誤碼:2030 - AzureSQLManagedInstanceNotReady

  • 訊息Azure SQL Managed Instance <Instance Name> isn't ready.

  • 原因:Azure SQL 受控執行個體未處於就緒狀態。

  • 建議:等到 Azure SQL 受控執行個體部署並準備就緒,然後重試程式。

錯誤碼:2033 - SqlDataCopyFailed

  • 訊息Migration for Database <Database> failed in state <state>.

  • 原因:資料移動的 ADF 管線失敗。

  • 建議:查看 MigrationStatusDetails 頁面,獲得更多錯誤詳細資訊。

錯誤碼:2038 - MigrationCompletedDuringCancel

  • 訊息Migration cannot be canceled as Migration was completed during the cancel process. Target server: <Target server> Target database: <Target database>.

  • 原因:收到取消要求,但在取消之前,移轉已順利完成。

  • 建議:不需要採取任何動作。 移轉已成功。

錯誤碼:2039 - MigrationRetryNotAllowed

  • 訊息Migration isn't in a retriable state. Migration must be in state WaitForRetry. Current state: <State>, Target server: <Target Server>, Target database: <Target database>.

  • 原因:移轉未處於允許重試的狀態時,收到重試要求。

  • 建議:不需要採取任何動作。 移轉進行中或已完成。

錯誤碼:2040 - MigrationTimeoutWaitingForRetry

  • 訊息Migration retry timeout limit of 8 hours reached. Target server: <Target Server>, Target database: <Target Database>.

  • 原因:移轉閒置於失敗但可擷取狀態 8 小時,並遭自動取消。

  • 建議:不需要採取任何動作;移轉已取消。

錯誤碼:2041 - DataCopyCompletedDuringCancel

  • 訊息Data copy finished successfully before canceling completed. Target schema is in bad state. Target server: <Target Server>, Target database: <Target Database>.

  • 原因:收到取消要求,且資料複製已成功完成,但目標資料庫結構描述未傳回其原始狀態。

  • 建議:想要的話,您可以執行第一個查詢和所有傳回的查詢,然後執行第二個查詢並進行相同動作,讓目標資料庫回到其原始狀態。

    SELECT [ROLLBACK]
    FROM [dbo].[__migration_status]
    WHERE STEP IN (3, 4, 6);
    
    SELECT [ROLLBACK]
    FROM [dbo].[__migration_status]
    WHERE STEP IN (5, 7, 8)
    ORDER BY STEP DESC;
    

錯誤碼:2042 - PreCopyStepsCompletedDuringCancel

  • 訊息Pre Copy steps finished successfully before canceling completed. Target database Foreign keys and temporal tables have been altered. Schema migration may be required again for future migrations. Target server: <Target Server>, Target database: <Target Database>.

  • 原因:已收到取消要求,且已順利完成準備目標資料庫以進行複製的步驟。 目標資料庫結構描述尚未回到其原始狀態。

  • 建議:想要的話,您可以執行下列查詢和所有傳回的查詢,讓目標資料庫回到至其原始狀態。

    SELECT [ROLLBACK]
    FROM [dbo].[__migration_status]
    WHERE STEP IN (3, 4, 6);
    

錯誤碼:2043 - CreateContainerFailed

  • 訊息Create container <ContainerName> failed with error Error calling the endpoint '<URL>'. Response status code: 'NA - Unknown'. More details: Exception message: 'NA - Unknown [ClientSideException] Invalid Url:<URL>.

  • 原因:要求因為基本問題而失敗,例如網路連線、DNS 失敗、伺服器憑證驗證或逾時。

  • 建議:如需更多疑難排解步驟,請參閱針對 Azure Data Factory 和 Synapse 管線進行疑難排解

錯誤碼:2049 - FileShareTestConnectionFailed

  • 訊息The value of the property '' is invalid: 'Access to <share path> is denied, resolved IP address is <IP address>, network type is OnPremise'.

  • 原因:儲存資料庫備份的網路共用與自我裝載整合執行階段 (SHIR) 位於相同的電腦中。

  • 建議:最新版本的 Integration Runtime (5.28.8488) 會防止存取本機主機上的網路檔案共用。 確保您在與網路共用裝載不同的電腦上執行 Integration Runtime。 如果您目前的移轉設定無法在不同電腦上裝載自我裝載整合執行階段和網路共用,您可以使用 DisableLocalFolderPathValidation 選項來選擇退出。

    附註

    如需詳細資訊,請參閱透過本機 PowerShell 設定現有的自我裝載 IR。 請謹慎使用停用選項,因為這樣較不安全。

錯誤碼:2055 - SqlInfoCollectionFailed

  • 訊息A database operation failed with the following error: 'VIEW SERVER PERFORMANCE STATE permission was denied on object 'server', database 'master'. The user does not have permission to perform this action.

  • 原因:用於目標伺服器 (Azure SQL 資料庫) 的登入名稱沒有 ##MS_ServerStateReader## 伺服器角色。

  • 建議:授予 ##MS_ServerStateReader## 角色給 Azure SQL 之目標登入。

    查詢:

    ALTER SERVER ROLE ##MS_ServerStateReader## ADD MEMBER <login>.
    

附註

此查詢應該在master資料庫的上下文中執行。

錯誤碼:2056 - SqlInfoValidationFailed

  • 訊息CollationMismatch: Source database collation <CollationOptionSource> is not the same as the target database <CollationOptionTarget>. Source database: <SourceDatabaseName> Target database: <TargetDatabaseName>.

  • 原因:來源資料庫定序與目標資料庫的定序不同。

  • 建議:將目標 Azure SQL 資料庫定序變更為與來源 SQL Server 資料庫相同。 Azure SQL Database 預設會使用 SQL_Latin1_General_CP1_CI_AS 定序,如果您的來源 SQL Server 資料庫使用不同的定序,您可能需要重新建立或選取其定序相符的不同目標資料庫。 如需詳細資訊,請參定序和 Unicode 支援

  • 訊息TableColumnCollationMismatch: Table <Tablename> with column <columnname> has collation <collationoptionsource> on source but has collation <collationoptiontarget> on target table.

  • 原因:來源資料庫資料表資料行的定序與目標資料庫資料表資料行的定序不同。

  • 建議

    1. 使用資料庫移轉服務將結構描述移轉至目標 Azure SQL 資料庫。 請參閱部落格

    2. 請遵循此文章以手動變更定序。

    如需詳細資訊,請參定序和 Unicode 支援

  • 訊息DatabaseSizeMoreThanMax: No tables were found in the target Azure SQL Database. Check if schema migration was completed beforehand.

  • 原因:目標 Azure SQL Database 中不存在針對移轉選取的資料表。

  • 建議:開始移轉之前,請確定已建立目標資料庫結構描述。 如需如何部署目標資料庫結構描述的詳細資訊,請參閱 SQL Database 專案延伸模組

  • 訊息DatabaseSizeMoreThanMax: The source database size <Source Database Size> exceeds the maximum allowed size of the target database <Target Database Size>. Check if the target database has enough space.

  • 原因:目標資料庫沒有足夠的空間。

  • 建議:開始移轉之前,請確定已建立目標資料庫結構描述。 如需如何部署目標資料庫結構描述的詳細資訊,請參閱 SQL Database 專案延伸模組

  • 訊息NoTablesFound: Some of the source tables don't exist in the target database. Missing tables: <TableList>

  • 原因:目標 Azure SQL Database 中不存在針對移轉選取的資料表。

  • 建議:檢查選取的資料表是否存在於目標 Azure SQL Database 中。 如果是從 PowerShell 指令碼呼叫此移轉,請檢查資料表清單參數是否包含正確的資料表名稱,並傳遞至移轉。

  • 訊息SqlVersionOutOfRange: Source instance version is lower than 2008, which is not supported to migrate. Source instance: <InstanceName>

  • 原因:Azure 資料庫移轉服務不支援從低於 2008 的 SQL Server 執行個體移轉。

  • 建議:將您的來源 SQL Server 執行個體升級至較新版本的 SQL Server。 如需詳細資訊,請參閱升級 SQL Server

  • 訊息TableMappingMismatch: Some of the source tables don't exist in the target database. Missing tables: <TableList>

  • 原因:目標 Azure SQL Database 中不存在針對移轉選取的資料表。

  • 建議:檢查選取的資料表是否存在於目標 Azure SQL Database 中。 如果是從 PowerShell 指令碼呼叫此移轉,請檢查資料表清單參數是否包含正確的資料表名稱,並傳遞至移轉。

錯誤碼:2060 - SqlSchemaCopyFailed

  • 訊息The SELECT permission was denied on the object 'sql_logins', database 'master', schema 'sys'.

  • 原因:客戶用來連接 Azure SQL Database 的帳戶缺少存取 sys.sql_logins 資料表的權限。

  • 建議:有兩個方式可以減輕問題:

    1. 系統管理員 角色新增至帳戶,以授與管理員權限。

    2. 如果客戶無法使用 sysadmin 帳戶,或無法將 系統管理員 權限授與帳戶,則所需的來源 SQL Server 的最低權限為 db_owner。 在目標 Azure SQL 資料庫中建立master使用者,並授予該使用者固定伺服器角色:##MS_DatabaseManager####MS_DatabaseConnector####MS_DefinitionReader####MS_LoginManager##。 例如:

      -- Run the script in the master database
      CREATE LOGIN testuser WITH PASSWORD = '<password>';
      
      ALTER SERVER ROLE ##MS_DefinitionReader## ADD MEMBER [testuser];
      GO
      
      ALTER SERVER ROLE ##MS_DatabaseConnector## ADD MEMBER [testuser];
      GO
      
      ALTER SERVER ROLE ##MS_DatabaseManager## ADD MEMBER [testuser];
      GO
      
      ALTER SERVER ROLE ##MS_LoginManager## ADD MEMBER [testuser];
      GO
      
      CREATE USER testuser FOR LOGIN testuser;
      EXECUTE sp_addRoleMember 'dbmanager', 'testuser';
      EXECUTE sp_addRoleMember 'loginmanager', 'testuser';
      
  • 訊息Failed to get service token from ADF service.

  • 原因:客戶的 SHIR 無法連線到 Data Factory。

  • 建議:這是如何解決的範例文件:整合執行階段無法連線到 Data Factory

  • 訊息IR Nodes are offline.

  • 原因:原因可能是在移轉期間網路中斷,因此 IR 節點變得離線。 確定安裝 SHIR 所在的電腦已開啟。

  • 建議:確定安裝 SHIR 所在的電腦已開啟。

  • 訊息Deployed failure: {0}. Object element: {1}.

  • 原因:這是客戶可能會遇到的最常見錯誤。 這表示物件無法部署到目標,因為它在目標上不受支援。

  • 建議:客戶必須檢查評量結果 (評量規則)。 這是結構描述移轉可能會失敗的評量問題的清單:

    附註

    若要檢視錯誤詳細資料,請開啟 Microsoft Integration Runtime 設定管理員,然後瀏覽至 [診斷] > [記錄] > [檢視記錄]。 在事件檢視器中,瀏覽至 [應用程式和服務記錄] > [連接器 - 整合執行階段],並篩選錯誤。

  • 訊息Deployed failure: Index cannot be created on computed column '{0}' of table '{1}' because the underlying object '{2}' has a different owner. Object element: {3}.

    範例產生的指令碼:IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[Sales].[Customer]') AND name = N'AK_Customer_AccountNumber') CREATE UNIQUE NONCLUSTERED INDEX [AK_Customer_AccountNumber] ON [Sales].[Customer] ( [AccountNumber] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)

  • 原因:計算資料行中的所有函式參考都必須具有與資料表相同的擁有者。

  • 建議:請參閱所有權需求

錯誤碼:Ext_RestoreSettingsError

  • 訊息Unable to read blobs in storage container, exception: The remote server returned an error: (403) Forbidden.; The remote server returned an error: (403) Forbidden

  • 原因:Azure SQL 目標無法連線到 Blob 儲存體。

  • 建議:確認目標網路設定允許存取 Blob 儲存體。 例如,如果您要移轉至 Azure VM 目標上的 SQL Server,請確保虛擬機器上的輸出連線不會遭到封鎖。

  • 訊息Failed to create restore job. Unable to read blobs in storage container, exception: The remote name could not be resolved.

  • 原因:Azure SQL 目標無法連線到 Blob 儲存體。

  • 建議:確認目標網路設定允許存取 Blob 儲存體。 例如,如果移轉至 SQL VM,請確保 VM 上的輸出連線不會遭到封鎖。

  • 訊息Migration for Database <Database Name> failed with error 'Migration cannot be completed because provided backup file name <Backup File Name> should be the last restore backup file <Last Restore Backup File Name>'

  • 原因:未在備份設定中指定最新的備份。

  • 建議:在備份設定中指定最新的備份檔案名稱,然後重試作業。

  • 訊息Operation failed: errorCode: Ext_RestoreSettingsError, message: RestoreId: 1111111-aaaa-bbbb-cccc-dddddddd, OperationId: 2222222-aaaa-bbbb-cccc-dddddddd, Detail: Unable to read blobs in storage container, exception: Unable to connect to the remote server;Unable to connect to the remote server;A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 11.111.11.111:443.

  • 原因:具有公用網路和私人端點設定的儲存體帳戶都可能發生該錯誤。 您也可能擁有可控制混合式網路路由和 DHCP 的內部部署 DNS 伺服器。 除非您允許 DNS 伺服器中設定的 Azure IP 位址,否則 Azure VM 目標上的 SQL Server 沒有機會解析遠端儲存體 Blob 端點。

  • 建議:若要對此問題進行偵錯,您可以嘗試從 Azure VM 目標上的 SQL Server Ping 您的 Azure Blob 儲存體 URL,並確認是否有連線問題。 若要解決此問題,您必須允許 DNS 伺服器中設定的 Azure IP 位址。 如需詳細資訊,請參閱針對 Azure 私人端點連線問題進行疑難排解

錯誤碼:找不到這樣的主機,或 urlopen 錯誤 [Errno 11001] getaddrinfo 失敗

  • 訊息No such host is known

  • 原因:使用 PowerShell 命令 New-AzDataMigrationLoginsMigration 移轉登入時,會發生失敗並出現先前的訊息。

  • 建議:若要解決此問題,請升級 Az.DataMigration 至0.14.5以上的版本。

    您可以從 Az.DataMigration下載最新版本,也可以使用下列命令來升級。

 Update-Module -Name Az.DataMigration
  • 訊息urlopen error [Errno 11001] getaddrinfo failed

  • 原因:使用 Azure CLI az dataMigration login-migration 移轉登入時,會發生失敗並出現先前的訊息。

  • 建議:若要解決此問題,請將 Microsoft Azure CLI - 資料庫移轉服務延伸模組 - az dataMigration 升級至 1.0.0b1 或更新版本。 執行以下命令進行升級。

 az extension update -n datamigration

錯誤碼:Blob 容器選取錯誤:列出容器內容時發生錯誤:此要求未獲授權使用此權限執行此作業。

  • 訊息Blob container selection error: Error listing the contents of the container: This request is not authorized to perform this operation using this permission.

  • 原因:使用「受控識別」以透過「Azure 入口網站」來移轉至 SQL 受控執行個體時,如果登入使用者沒有儲存體帳戶的「儲存體 Blob 資料讀者」存取權,則會失敗,並顯示上一個訊息。

  • 建議:若要解決此問題,請確定登入的使用者在儲存體帳戶上具有 Blob 儲存體資料讀取器 存取權。 需要此權限,才能在透過 Azure 入口網站進行移轉設定期間列出 Blob 容器中的資料夾和檔案。 如需詳細資訊,請參閱 DMS - Azure SQL 受控實例移轉的受控識別支援

Azure 資料庫移轉服務命名規則

如果您的 DMS 服務失敗發生在Error: Service name 'x_y_z' is not valid,那麼您必須遵循 Azure 資料庫移轉服務命名規則。 當 Azure 資料庫移轉服務使用 Azure Data Factory 進行計算時,它會遵循命名規則中所述完全相同的命名規則。

Azure SQL Database 限制

使用適用於 Azure Data Studio 的 Azure SQL 延伸模組來移轉至 Azure SQL Database 時,具有下列限制:

Azure SQL Database 離線移轉會利用 Azure Data Factory (ADF) 管線來移動資料,因而遵守 ADF 限制。 建立資料庫移轉服務時,也會建立對應的 ADF。 因此,每個服務都適用處理站限制。

  • 安裝 SHIR 所在的電腦可作為移轉的計算。 請確定本機可以處理資料副本的 CPU 和記憶體負載。 如需詳細資訊,請參閱 SHIR 建議

  • 每個資料庫 100,000 個資料表限制。

  • 每個服務 10,000 個同時資料庫移轉。

  • 移轉速度高度取決於目標 Azure SQL Database SKU 和自我裝載整合執行階段主機。

  • Azure SQL Database 移轉因開始活動造成的 ADF 額外負荷,調整資料表數量的效能不佳。 如果資料庫有數千個資料表,則每個資料表的啟動程序可能需要幾秒鐘的時間,即使它們是由一個具有 1 位元資料的資料列組成也一樣。

  • 目前不支援移轉具有雙位元組字元的 Azure SQL Database 資料表名稱。 緩解措施是在移轉之前重新命名資料表。 成功移轉後,可以將其變更回原始名稱。

  • 具有大型 blob 資料行的資料表,可能會因為逾時而無法移轉。

  • 目前不支援 SQL Server 保留的資料庫名稱。

  • 目前不支援包含分號的資料庫名稱。

  • 不會移轉計算資料行。

  • 來源資料庫中具有預設條件約束且包含 NULL 值的資料行會使用其在目標 Azure SQL 資料庫上定義的預設值進行移轉,而不是保留 NULL。

Azure SQL 受控執行個體的限制

重要事項

具有 Azure SQL 延伸模組的連線移轉會使用與記錄轉送服務 (LRS) 相同的技術,並且具有相同的限制。 將資料庫移轉至 業務關鍵 服務層級之前,請考慮這些限制,不適用於一般用途服務層級。

使用適用於 Azure Data Studio 的 Azure SQL 擴充功能來移轉至 Azure SQL 受控執行個體時,會有下列限制:

  • 如果移轉單一資料庫,資料庫備份必須放在資料庫資料夾內的一般檔案結構中 (包括容器根資料夾) ,而且資料夾無法巢狀。 不支援巢狀資料夾。

  • 如果使用相同的 Azure Blob 儲存體容器來移轉多個資料庫,您必須將各個資料庫的備份檔案放在容器內的單獨資料夾中。

  • 不支援在目標 Azure SQL 受控執行個體中使用資料庫移轉服務 (DMS) 覆寫現有的資料庫。

  • DMS 不支援在您的目標上設定高可用性和災害復原以符合來源拓撲。

  • 不支援下列伺服器物件:

    • SQL Server Agent 作業
    • 認證
    • SQL Server Integration Services (SSIS) 套件
    • 伺服器稽核
  • 您無法使用從 Azure Data Factory 建立的現有自我裝載整合執行階段,以使用 DMS 進行資料庫移轉。 一開始,自我裝載整合執行階段應使用 Azure Data Studio 中的 Azure SQL 移轉延伸模組建立,並可重複使用以進行進一步資料庫移轉。

  • 單一記錄重播服務 (LRS) 作業 (由 DMS 所建立) 最多可以執行 30 天。 此期間到期時,作業會自動取消,因此您的目標資料庫會自動遭到刪除。

  • 如果您收到下列錯誤: Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance,則此問題是設計使然。 Azure SQL 受控執行個體的一般用途層不支援 SQL Server In-Memory OLTP。 若要繼續移轉,其中一種方式是升級至支援記憶體內 OLTP 的業務關鍵層級。 另一種方式是確定在 Azure SQL 受控執行個體為一般用途時,來源資料庫未使用它。

Azure VM 上的 SQL Server 限制

使用適用於 Azure Data Studio 的 Azure SQL 延伸模組來移轉至 Azure VM 上的 SQL Server 時,具有下列限制:

  • 如果移轉單一資料庫,資料庫備份必須放在資料庫資料夾內的一般檔案結構中 (包括容器根資料夾),而且資料夾無法巢狀。 不支援巢狀資料夾。

  • 如果使用相同的 Azure Blob 儲存體容器來移轉多個資料庫,您必須將各個資料庫的備份檔案放在容器內的單獨資料夾中。

  • 不支援使用資料庫移轉服務 (DMS) 來覆寫 Azure 虛擬機器上目標 SQL Server 中的現有資料庫。

  • DMS 不支援在您的目標上設定高可用性和災害復原以符合來源拓撲。

  • 不支援下列伺服器物件:

    • SQL Server Agent 作業
    • 認證
    • SQL Server Integration Services (SSIS) 套件
    • 伺服器稽核
  • 您無法使用從 Azure Data Factory 建立的現有自我裝載整合執行階段,以使用 DMS 進行資料庫移轉。 一開始,應該使用 Azure Data Studio 中的 Azure SQL 移轉延伸模組來建立自我裝載整合執行階段,並可重複用於進一步的資料庫移轉。

  • 移轉至 Azure 虛擬機器上的 SQL Server 時,不支援以 SQL Server 2008 和更早版本作為目標版本的虛擬機器 (VM)。

  • 如果您將 VM 與 SQL Server 2012 或 SQL Server 2014 搭配使用,您必須將來源資料庫備份檔案儲存在 Azure Blob 儲存體容器上,而不是使用網路共用選項。 將備份檔案儲存為分頁 Blob,因為區塊 Blob 僅在 SQL Server 2016 及更新版本中受到支援。

  • 您必須確定目標 Azure 虛擬機器中的 SQL Server IaaS 代理程式延伸模組處於 完整模式 ,而不是輕量型模式。

  • SQL Server IaaS 代理程式延伸模組僅支援管理預設伺服器執行個體或單一具名執行個體。

  • 您可以同時使用一或多項移轉將最多 100 個資料庫移轉到與目標相同的 Azure SQL Server 虛擬機器。 此外,一旦具有 100 個資料庫的移轉完成,您必須等候至少 30 分鐘,才能開始新的移轉至與目標相同的 Azure SQL Server VM。 此外,每個資料庫的每項移轉作業 (開始移轉、完全移轉) 都需要按順序花費幾分鐘的時間。 例如,若要移轉 100 個資料庫,建立移轉佇列可能需要大約 200 (2 x 100) 分鐘,而切斷所有 100 個資料庫大約需要 100 (1 x 100) 分鐘 (不包括備份和還原計時)。 因此,隨著資料庫數目的增加,移轉速度會變得更慢。

    您應該根據嚴格的移轉測試預先排程較長的移轉時段,或在將大量資料庫移轉至 SQL Server Azure VM 時將大量資料庫分割成批次。

  • 除了設定 Azure 儲存體帳戶的網路/防火牆以允許 VM 存取備份檔案之外。 您也必須設定 Azure VM 上 SQL Server 的網路/防火牆,以允許輸出連線至儲存體帳戶。

  • 在 SQL 遷移過程中,您必須保持 Azure VM 上的目標 SQL Server 電源 開啟。 此外,在建立新的移轉、執行容錯移轉或取消移轉時也會發生相同情況。

  • 錯誤Login failed for user 'NT Service\SQLIaaSExtensionQuery

    原因:SQL Server 執行個體處於單一使用者模式。 其中一個可能的原因是 Azure VM 上的目標 SQL Server 處於升級模式。

    解決方案:等候 Azure VM 上的目標 SQL Server 結束升級模式,然後重新開始移轉。

  • 錯誤Ext_RestoreSettingsError, message: Failed to create restore job.;Cannot create file 'F:\data\XXX.mdf' because it already exists

    解決方案:連線到 Azure VM 上的目標 SQL Server,並刪除 XXX.mdf 檔案。 然後,再次開始移轉。

Azure Data Studio 限制

無法啟動 SQL 移轉服務: 錯誤: 要求錯誤

  • 訊息Error at ClientRequest.<anonymous> (c:\Users\MyUser\.azuredatastudio\extensions\microsoft.sql-migration-1.4.2\dist\main.js:2:7448) at ClientRequest.emit (node:events:538:35) at TLSSocket.socketOnEnd (node:_http_client:466:9) at TLSSocket.emit (node:events:538:35) at endReadableNT (node:internal/streams/readable:1345:12) at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

  • 原因:當 Azure Data Studio 無法從 https://github.com/microsoft/sqltoolsservice/releases 下載 MigrationService 套件時,就會發生此問題。 下載失敗可能是因為中斷連線的網路工作或未解析的 Proxy 設定。

  • 建議:解決此問題一定會成功的方式是手動下載套件。 遵循此連結中所述的風險降低步驟:https://github.com/microsoft/azuredatastudio/issues/22558#issuecomment-1496307891