你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

已知问题、限制和故障排除

本文提供了与 Azure Data Studio 的 Azure SQL 迁移扩展关联的已知问题和故障排除步骤的列表。

重要

最新版本的 Integration Runtime (5.28.8488) Hui 阻止访问本地主机上的网络文件共享。 zai 使用 DMS 执行到 Azure SQL 的迁移时,此安全措施将导致失败。 请确保在与网络共享托管不同的计算机上运行 Integration Runtime。

错误代码: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.

  • 原因:SQL Vm 还原当前不支持使用全文目录文件还原数据库,因为 Azure SQL Vm 目前不支持它们。

  • 建议:在创建还原时从数据库中移除全文目录文件

  • 消息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}'.'

  • 原因:此错误是由于 SqlMi 中的已知限制导致的。 这意味着“{providedFileName}”不同于“{lastRestoredFileName}”。 SqlMi 将根据 LSN 序列自动还原容器中的全部有效备份文件。 典型的失败情况可能是:“{providedFileName}”为“log1”,但容器中的文件具有其他文件(例如“log2”),其最大 LSN 数大于“log1”。 在这种情况下,SqlMi 将自动还原容器中的所有文件。 完成迁移后,SqlMi 将报告此错误消息。

  • 建议:对于脱机迁移模式,请提供具有最大 LSN 的“lastBackupName”。 对于联机迁移方案,如果迁移状态为成功,则可以忽略此警告/错误。

错误代码:2009 - MigrationRestoreFailed

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

  • 原因:在迁移数据之前,需要从受透明数据加密 (TDE) 保护的数据库将源 SQL Server 实例证书迁移到目标 Azure SQL 托管实例或 Azure 虚拟机上的 SQL Server。

  • 建议:将 TDE 证书迁移到目标实例,然后重试该过程。 有关迁移已启用 TDE 的数据库的详细信息,请参阅教程:将已启用 TDE 的数据库(预览版)迁移到 Azure Data Studio 中的 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"
    EXEC sp_configure 'contained', 1;
    RECONFIGURE;
    

    注意

    有关 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 数据工厂和 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。 请慎重使用禁用选项,因为此操作安全性较低。

错误代码: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 数据库使用 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 数据库中不存在适用于迁移的所选表。

  • 建议:在开始迁移之前,请确保已创建目标数据库架构。 有关如何部署目标数据库架构的详细信息,请参阅 SQL 数据库项目扩展

  • 消息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 数据库项目扩展

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

  • 原因:目标 Azure SQL 数据库中不存在适用于迁移的所选表。

  • 建议:检查目标 Azure SQL 数据库中是否存在所选表。 如果从 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 数据库中不存在适用于迁移的所选表。

  • 建议:检查目标 Azure SQL 数据库中是否存在所选表。 如果从 PowerShell 脚本调用此迁移,请检查表列表参数是否包含正确的表名,以及该参数是否被传递到迁移中。

错误代码:2060 - SqlSchemaCopyFailed

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

  • 原因:客户用来连接 Azure SQL 数据库的帐户缺少访问 sys.sql_logins 表的权限。

  • 建议:可以通过两种方法缓解该问题:

    1. 将“sysadmin”角色添加到帐户,这会授予管理员权限。

    2. 如果客户无法使用 sysadmin 帐户或无法向帐户授予 sysadmin 权限,则对源 SQL Server 所需的最低权限为“db_owner”,在目标 Azure SQL DB 上在主数据库中创建用户,并向该用户授予 ##MS_DatabaseManager##、##MS_DatabaseConnector##、##MS_DefinitionReader## 和 ##MS_LoginManager## 固定服务器角色。 例如,

      -- Run the script in the master
      -- Please run the script on Master database
      CREATE LOGIN testuser with 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 from login testuser;
      EXEC sp_addRoleMember 'dbmanager', 'testuser';
      EXEC sp_addRoleMember 'loginmanager', 'testuser';
      
  • 消息Failed to get service token from ADF service.

  • 原因:客户的 SHIR 无法连接数据工厂。

  • 建议:以下是如何解决它的示例文档:集成运行时无法连接到数据工厂

  • 消息IR Nodes are offline.

  • 原因:原因可能在于网络会在迁移期间中断,因此 IR 节点会脱机。 确保安装了 SHIR 的计算机已打开。

  • 建议:确保安装了 SHIR 的计算机处于打开状态。

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

  • 原因:这是客户可能会遇到的最常见错误。 这意味着无法将对象部署到目标,因为它在目标上不受支持。

  • 建议:客户需要检查评估结果(评估规则)。 这是可能导致架构迁移失败的评估问题列表:

    BULK INSERT

    Compute 子句

    加密提供程序

    跨数据库引用

    数据库主体别名

    DISABLE_DEF_CNST_CHK 选项

    FASTFIRSTROW 提示

    FILESTREAM

    MS DTC

    OPENROWSET(批量)

    OPENROWSET(提供程序)

    注意

    要查看错误详细信息,请打开 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 专用终结点连接问题

Azure 数据库迁移服务命名规则

如果 DMS 服务失败并出现“错误: 服务名称 "x_y_z" 无效”,则需要遵循 Azure 数据库迁移服务命名规则。 由于 Azure 数据库迁移服务使用 Azure 数据工厂进行计算,因此遵循与此处所述完全相同的命名规则。

Azure SQL 数据库限制

使用适用于 Azure Data Studio 的 Azure SQL 扩展迁移到 Azure SQL 数据库具有以下限制:

Azure SQL 数据库脱机迁移利用 Azure 数据工厂 (ADF) 管道进行数据移动,因此遵守 ADF 限制。 如果同时创建数据库迁移服务,则会创建相应的 ADF。 因此,工厂限制适用于每个服务。

  • 安装 SHIR 的计算机充当迁移的计算。 确保此计算机可以处理数据复制的 CPU 和内存负载。 若要了解详细信息,请查看 SHIR 建议
  • 每个数据库限制为 100,000 个表。
  • 每个服务限制为 10,000 个并发数据库迁移。
  • 迁移速度在很大程度上取决于目标 Azure SQL 数据库 SKU 和自承载集成运行时主机。
  • 由于启动活动时的 ADF 开销,Azure SQL 数据库迁移对表编号的可伸缩性很差。 如果数据库包含数千个表,每个表的启动过程都可能需要几秒钟时间,即使这些表仅包含 1 位数据的一行。
  • 目前不支持对具有双字节字符的 Azure SQL 数据库表名进行迁移。 缓解措施是在迁移前重命名表;成功迁移后,可以将其更改回原始名称。
  • 由于超时,具有大型 Blob 列的表可能无法迁移。
  • 目前不支持保留了 SQL Server 的数据库名称。
  • 目前不支持包含分号的数据库名称。
  • 不会迁移计算列。

Azure SQL 托管实例限制

使用 Azure Data Studio 的 Azure SQL 扩展迁移到 Azure SQL 托管实例具有以下限制:

  • 如果迁移单一数据库,数据库备份必须放置在数据库文件夹内的平面文件结构中(包括容器根文件夹),并且文件夹不能嵌套,因为不支持嵌套文件夹。
  • 如果使用同一个 Azure Blob 存储容器迁移多个数据库,则必须将不同数据库的备份文件置于容器内的单独文件夹中。
  • 不支持在目标 Azure SQL 托管实例中使用 DMS 覆盖现有数据库。
  • DMS 不支持在目标上配置高可用性和灾难恢复来匹配源拓扑。
  • 不支持下列服务器对象:
    • SQL Server 代理作业
    • 凭据
    • SSIS 包
    • 服务器审核
  • 不能使用从 Azure 数据工厂创建的现有自承载集成运行时通过 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 托管实例常规用途层不支持 Hekaton(也称为 SQL Server 内存中 OLTP)。 若要继续迁移,一种方法是升级到支持 Hekaton 的业务关键层。 另一种方法是确保源数据库在 Azure SQL 托管实例为常规用途时不使用 Hekaton。

Azure VM 上的 SQL Server 限制

使用 Azure Data Studio 的 Azure SQL 扩展迁移到 Azure VM 上的 SQL Server 具有以下限制:

  • 如果迁移单一数据库,数据库备份必须放置在数据库文件夹内的平面文件结构中(包括容器根文件夹),并且文件夹不能嵌套,因为不支持嵌套文件夹。
  • 如果使用同一个 Azure Blob 存储容器迁移多个数据库,则必须将不同数据库的备份文件置于容器内的单独文件夹中。
  • 不支持在目标 Azure 虚拟机上的 SQL Server 中使用 DMS 覆盖现有数据库。
  • DMS 不支持在目标上配置高可用性和灾难恢复来匹配源拓扑。
  • 不支持下列服务器对象:
    • SQL Server 代理作业
    • 凭据
    • SSIS 包
    • 服务器审核
  • 不能使用从 Azure 数据工厂创建的现有自承载集成运行时通过 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 2016 及更高版本中受支持。
  • 必须确保目标 Azure 虚拟机中的 SQL IaaS 代理扩展处于完整模式而不是轻量模式。
  • SQL IaaS 代理扩展仅支持对 Default Server Instance 或 Single Named Instance 进行管理。
  • 可以迁移到 SQL Server Azure 虚拟机的数据库数量取决于硬件规格和工作负载,但没有强制限制。 但是,每个数据库的每项迁移操作(开始迁移、直接转换)将依次花费几分钟时间。 例如,若要迁移 100 个数据库,创建迁移队列可能需要大约 200 (2 x 100) 分钟,并且直接转换所有 100 个数据库需要大约 100 (1 x 100) 分钟(不包括备份和还原时间)。 因此,随着数据库数量的增加,迁移速度会变慢。 Microsoft 建议根据严格的迁移测试提前安排更长的迁移时限,或者在将大量数据库迁移到 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 包时,会出现此问题。 下载失败可能是由于网络工作断开或代理设置未解决。

  • 建议:解决此问题的可靠方法是手动下载包。 按照此链接中所述的缓解步骤操作:https://github.com/microsoft/azuredatastudio/issues/22558#issuecomment-1496307891