联机迁移到 Azure SQL 数据库时存在的已知问题/迁移限制Known issues/migration limitations with online migrations to Azure SQL Database

下面描述了从 SQL Server 联机迁移到 Azure SQL 数据库时存在的已知问题和限制。Known issues and limitations associated with online migrations from SQL Server to Azure SQL Database are described below.

重要

将 SQL Server 联机迁移到 Azure SQL 数据库时,不支持迁移 SQL_variant 数据类型。With online migrations of SQL Server to Azure SQL Database, migration of SQL_variant data types is not supported.

不支持迁移时态表Migration of temporal tables not supported

症状Symptom

如果源数据库包含一个或多个时态表,在执行“完整数据加载”操作期间数据库迁移将会失败,并可能出现以下消息:If your source database consists of one or more temporal tables, your database migration fails during the “Full data load” operation and you may see the following message:

{ "resourceId":"/subscriptions/<subscription id>/resourceGroups/migrateready/providers/Microsoft.DataMigration/services/<DMS Service name>", "errorType":"Database migration error", "errorEvents":"["Capture functionalities could not be set. RetCode: SQL_ERROR SqlState: 42000 NativeError: 13570 Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]The use of replication is not supported with system-versioned temporal table '[Application. Cities]' Line: 1 Column: -1 "]" }

时态表错误示例

解决方法Workaround

使用以下步骤。Use the following steps.

  1. 使用以下查询在源架构中查找时态表。Find the temporal tables in your source schema using the query below.

    select name,temporal_type,temporal_type_desc,* from sys.tables where temporal_type <>0
    
  2. 在用于指定要迁移的表的“配置迁移设置”边栏选项卡中排除这些表。Exclude these tables from the Configure migration settings blade, on which you specify tables for migration.

  3. 重新运行迁移活动。Rerun the migration activity.

资源Resources

有关详细信息,请参阅时态表一文。For more information, see the article Temporal Tables.

迁移的表中包含一个或多个 hierarchyid 数据类型的列Migration of tables includes one or more columns with the hierarchyid data type

症状Symptom

在执行“完整数据加载”操作期间,可能会出现一个 SQL 异常,指出“ntext 与 hierarchyid 不兼容”:You may see a SQL Exception suggesting “ntext is incompatible with hierarchyid” during the “Full data load” operation:

hierarchyid 错误示例

解决方法Workaround

使用以下步骤。Use the following steps.

  1. 使用以下查询来查找包含 hierarchyid 数据类型的列的用户表。Find the user tables that include columns with the hierarchyid data type using the query below.

    select object_name(object_id) 'Table name' from sys.columns where system_type_id =240 and object_id in (select object_id from sys.objects where type='U')
    
  2. 在用于指定要迁移的表的“配置迁移设置”边栏选项卡中排除这些表。Exclude these tables from the Configure migration settings blade, on which you specify tables for migration.

  3. 重新运行迁移活动。Rerun the migration activity.

在执行“完整数据加载”或“增量数据同步”期间发生迁移失败,并且与架构中的活动触发器发生各种完整性冲突Migration failures with various integrity violations with active triggers in the schema during “Full data load” or “Incremental data sync”

解决方法Workaround

使用以下步骤。Use the following steps.

  1. 使用以下查询在源数据库中查找当前处于活动状态的触发器:Find the triggers that are currently active in the source database using the query below:

    select * from sys.triggers where is_disabled =0
    
  2. 使用 DISABLE TRIGGER (Transact-SQL) 一文中提供的步骤在源数据库中禁用这些触发器。Disable the triggers on your source database using the steps provided in the article DISABLE TRIGGER (Transact-SQL).

  3. 重新运行迁移活动。Rerun the migration activity.

对 LOB 数据类型的支持Support for LOB data types

症状Symptom

如果大型对象 (LOB) 列的长度超过 32 KB,目标上的数据可能会截断。If the length of Large Object (LOB) column is bigger than 32 KB, data might get truncated at the target. 可使用以下查询检查 LOB 列的长度:You can check the length of LOB column using the query below:

SELECT max(DATALENGTH(ColumnName)) as LEN from TableName

解决方法Workaround

如果 LOB 列大于 32 KB,请联系 Azure 支持If you have an LOB column that is bigger than 32 KB, contact Azure support.

时间戳列的问题Issues with timestamp columns

症状Symptom

Azure 数据库迁移服务不会迁移源时间戳值,而是在目标表中生成新的时间戳值。Azure Database Migration Service doesn't migrate the source timestamp value; instead, Azure Database Migration Service generates a new timestamp value in the target table.

解决方法Workaround

如果需要 Azure 数据库迁移服务迁移源表中存储的确切时间戳值,请联系 Azure 支持If you need Azure Database Migration Service to migrate the exact timestamp value stored in the source table, contact Azure support.

发生数据迁移错误时,“数据库详细状态”边栏选项卡上不会提供其他详细信息Data migration errors don't provide additional details on the Database detailed status blade

症状Symptom

如果“数据库详细状态”视图中显示迁移失败,选择顶部功能区中的“数据迁移错误”链接可能不会提供特定于该迁移失败的其他详细信息。When you come across migration failures in the Databases details status view, selecting the Data migration errors link on the top ribbon may not provide additional details specific to the migration failures.

发生数据迁移错误时不提供详细信息的示例

解决方法Workaround

若要查看特定失败的详细信息,请执行以下步骤。To get to specific failure details, use the following steps.

  1. 关闭“数据库详细状态”边栏选项卡以显示“迁移活动”屏幕。Close the Database detailed status blade to display the Migration activity screen.

    迁移活动屏幕

  2. 选择“查看错误详细信息”以查看可帮助排查迁移错误的具体错误消息。Select See error details to view specific error messages that help you to troubleshoot migration errors.

SQLDB 联机迁移不支持地理数据类型Geography datatype not supported in SQLDB online migration

症状Symptom

迁移失败并出现包含以下文本的错误消息:Migration fails with an error message containing the following text:

"** encountered a fatal error", "errorEvents":<Table>.<Column> is of type 'GEOGRAPHY', which is not supported by 'Full Load' under 'Full LOB' support mode.

解决方法Workaround

尽管 Azure 数据库迁移服务支持将地理数据类型的数据脱机迁移到 Azure SQL 数据库,但不支持联机迁移地理数据类型。While Azure Database Migration Service supports the Geography data type for offline migrations to Azure SQL Database, for online migrations, the Geography datatype is not supported. 在尝试使用 Azure 数据库迁移服务联机迁移此数据库之前,请使用替代方法将源中的数据类型更改为支持的类型。Try alternate methods to change the datatype at the source to a supported type before attempting to use Azure Database Migration Service for an online migration of this database.

支持的版本Supported editions

症状Symptom

迁移失败并出现包含以下文本的错误消息:Migration fails with an error message containing the following text:

Migration settings validation error: The edition of the server [Business Intelligence Edition (64-bit)] does not match the supported edition(s) [Enterprise,Standard,Developer].

解决方法Workaround

只有企业版、标准版和开发人员版才提供使用 Azure 数据库迁移服务联机迁移到 Azure SQL 数据库的扩展支持。Support for online migrations to Azure SQL Database using Azure Database Migration Service extends only to the Enterprise, Standard, and Developer editions. 在开始迁移之前,请确保使用受支持的版本。Be sure that you are using a supported edition before beginning the migration process.