联机迁移到 Azure SQL 托管实例时存在的已知问题/迁移限制Known issues/migration limitations with online migrations to Azure SQL Managed Instance

下面介绍了从 SQL Server 联机迁移到 Azure SQL 托管实例时的已知问题和限制。Known issues and limitations that are associated with online migrations from SQL Server to Azure SQL Managed Instance 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.

备份要求Backup requirements

  • 使用校验和的备份Backups with checksum

    Azure 数据库迁移服务使用备份和还原方法将本地数据库迁移到 SQL 托管实例。Azure Database Migration Service uses the backup and restore method to migrate your on-premises databases to SQL Managed Instance. Azure 数据库迁移服务仅支持使用校验和创建的备份。Azure Database Migration Service only supports backups created using checksum.

    在备份或还原期间启用或禁用备份校验和 (SQL Server)Enable or Disable Backup Checksums During Backup or Restore (SQL Server)

    备注

    如果通过压缩进行数据库备份,则除非明确禁用,否则校验和是默认行为。If you take the database backups with compression, the checksum is a default behavior unless explicitly disabled.

    脱机迁移时,如果选择“我将让 Azure 数据库迁移服务...”,则 Azure 数据库迁移服务进行数据库备份时会启用校验和选项。With offline migrations, if you choose I will let Azure Database Migration Service…, then Azure Database Migration Service will take the database backup with the checksum option enabled.

  • 备份介质Backup media

    确保将每个备份都置于单独的备份介质(备份文件)上。Make sure to take every backup on a separate backup media (backup files). Azure 数据库迁移服务不支持追加到单个备份文件的备份。Azure Database Migration Service doesn't support backups that are appended to a single backup file. 将完整备份和日志备份置于单独的备份文件中。Take full backup and log backups to separate backup files.

数据和日志文件布局Data and log file layout

  • 日志文件数Number of log files

    Azure 数据库迁移服务不支持包含多个日志文件的数据库。Azure Database Migration Service doesn't support databases with multiple log files. 如果有多个日志文件,请将其收缩并重组到单个事务日志文件中。If you have multiple log files, shrink and reorganize them into a single transaction log file. 由于无法远程操作非空日志文件,因此需要先备份日志文件。Because you can't remote to log files that aren't empty, you need to back up the log file first.

SQL Server 功能SQL Server features

  • FileStream/FiletableFileStream/FileTables

    SQL 托管实例当前不支持 FileStream 和 FileTable。SQL Managed Instance currently doesn't support FileStream and FileTables. 对于依赖这些功能的工作负载,建议选择 Azure VM 上运行的 SQL Server 作为 Azure 目标。For workloads dependent on these features, we recommend that you opt for SQL Servers running on Azure VMs as your Azure target.

  • 内存中表In-memory tables

    内存中 OLTP 在 SQL 托管实例高级层和业务关键层中可用;常规用途层不支持内存中 OLTP。In-memory OLTP is available in the Premium and Business Critical tiers for SQL Managed Instance; the General Purpose tier doesn't support In-memory OLTP.

迁移重置Migration resets

  • 部署Deployments

    SQL 托管实例是一种具有自动修补和版本更新功能的 PaaS 服务。SQL Managed Instance is a PaaS service with automatic patching and version updates. 迁移 SQL 托管实例期间,非关键更新最多保留 36 小时。During migration of your SQL Managed Instance, non-critical updates are held for up to 36 hours. 之后(对于关键更新),如果迁移中断,此过程将重置为完全还原状态。Afterwards (and for critical updates), if the migration is disrupted, the process resets to a full restore state.

    仅在完整备份还原完成且与所有日志备份一致后才能调用迁移切换。Migration cutover can only be called after the full backup is restored and catches up with all log backups.

SMB 文件共享连接SMB file share connectivity

连接到 SMB 文件共享时出现的问题可能是由权限问题导致的。Issues connecting to the SMB file share are likely caused by a permissions issue.

若要测试 SMB 文件共享连接,请执行以下步骤:To test SMB file share connectivity, follow these steps:

  1. 将备份保存到 SMB 文件共享。Save a backup to the SMB file share.

  2. 验证 Azure 数据库迁移服务的子网与源 SQL Server 之间的网络连接。Verify network connectivity between the subnet of Azure Database Migration Service and the source SQL Server. 执行此操作的最简单方法是将 SQL Server 虚拟机部署到 DMS 子网,并使用 SQL Server Management Studio 连接到源 SQL Server。The easiest way to do this is to deploy a SQL Server virtual machine to the DMS subnet and connect to the source SQL Server using SQL Server Management Studio.

  3. 从文件共享上的备份中还原源 SQL Server 上的标头:Restore the header on the source SQL Server from the backup on the fileshare:

    RESTORE HEADERONLY   
    FROM DISK = N'\\<SMB file share path>\full.bak'
    

如果无法连接到该文件共享,请按照以下步骤配置权限:If you are unable to connect to the file share, configure permissions with these steps:

  1. 使用文件资源管理器导航到该文件共享。Navigate to your file share using File Explorer.

  2. 右键单击该文件共享并选择“属性”。Right-click the file share and select properties.

  3. 选择“共享”选项卡,然后选择“高级共享”。 Choose the Sharing tab and select Advanced Sharing.

  4. 添加用于迁移的 Windows 帐户,并为其分配“完全控制”访问权限。Add the Windows account used for migration, and assign it full control access.

  5. 添加 SQL Server 服务帐户,并为其分配“完全控制”访问权限。Add the SQL Server service account, and assign it full control access. 请在 SQL Server 配置管理器中查找 SQL Server 服务帐户(如果你不确定要使用哪个帐户)。Check the SQL Server Configuration Manager for the SQL Server service account if you're not sure which account is being used.

    对用于迁移的 Windows 帐户和 SQL Server 服务帐户授予“完全控制”权限。