迁移概述:将 SQL Server 到 SQL 托管实例Migration overview: SQL Server to SQL Managed Instance

适用于: Azure SQL 托管实例

了解有关将 SQL Server 迁移到 Azure SQL 托管实例的不同迁移选项和注意事项。Learn about different migration options and considerations to migrate your SQL Server to Azure SQL Managed Instance.

你可以迁移在本地或以下位置运行的 SQL Server:You can migrate SQL Server running on-premises or on:

  • 虚拟机上的 SQL ServerSQL Server on Virtual Machines
  • Amazon Web Services (AWS) EC2Amazon Web Services (AWS) EC2
  • Amazon 关系数据库服务 (AWS RDS)Amazon Relational Database Service (AWS RDS)
  • 计算引擎 (Google Cloud Platform - GCP)Compute Engine (Google Cloud Platform - GCP)
  • Cloud SQL for SQL Server (Google Cloud Platform - GCP)Cloud SQL for SQL Server (Google Cloud Platform – GCP)

有关其他方案,请参阅数据库迁移指南For other scenarios, see the Database Migration Guide.

概述Overview

对于需要完全托管服务而无需管理虚拟机或其操作系统的 SQL Server 工作负载,建议将 Azure SQL 托管实例 作为目标选项。Azure SQL Managed Instance is a recommended target option for SQL Server workloads that require a fully managed service without having to manage virtual machines or their operating systems. 使用 SQL 托管实例,只需最小程度的应用程序或数据库更改,便可将本地应用程序直接迁移到 Azure,同时可通过本机虚拟网络 (VNet) 支持实现实例的完全隔离。SQL Managed Instance enables you to lift-and-shift your on-premises applications to Azure with minimal application or database changes while having complete isolation of your instances with native virtual network (VNet) support.

注意事项Considerations

评估迁移选项时要考虑的关键因素取决于:The key factors to consider when evaluating migration options depend on:

  • 服务器和数据库的数量Number of servers and databases
  • 数据库大小Size of databases
  • 迁移过程中可接受的业务停机时间Acceptable business downtime during the migration process

将 SQL Server 迁移到 SQL 托管实例的主要优点之一是,可以选择迁移整个实例,也可以只迁移单个数据库的子集。One of the key benefits of migrating your SQL Servers to SQL Managed Instance is that you can choose to migrate the entire instance, or just a subset of individual databases. 请仔细计划在迁移过程中包括以下各项:Carefully plan to include the following in your migration process:

  • 需要共存于同一实例的所有数据库All databases that need to be colocated to the same instance
  • 应用程序所需的实例级对象,包括登录名、凭据、SQL 代理作业和操作员,以及服务器级触发器。Instance-level objects required for your application, including logins, credentials, SQL Agent jobs and operators, and server-level triggers.

备注

即使发生严重的情况,Azure SQL 托管实例也能保证 99.99% 的可用性,因此,SQL MI 无法禁用这些功能造成的开销。Azure SQL Managed Instance guarantees 99.99% availability even in critical scenarios, so overhead caused by some features in SQL MI cannot be disabled. 有关详细信息,请参阅可能导致 SQL Server 和 Azure SQL 托管实例上出现不同性能的根本原因博客。For more information, see the root causes that might cause different performance on SQL Server and Azure SQL Managed Instance blog.

选择适当的目标Choose appropriate target

可借助一些通用准则来选择正确的服务层和 SQL 托管实例的特征,以帮助匹配你的性能基线Some general guidelines to help you choose the right service tier and characteristics of SQL Managed Instance to help match your performance baseline:

  • 使用 CPU 使用情况基线来配置与 SQL Server 实例使用的核心数量相匹配的托管实例。Use the CPU usage baseline to provision a managed instance that matches the number of cores your instance of SQL Server uses. 可能有必要横向扩展资源以匹配硬件生成特征It may be necessary to scale resources to match the hardware generation characteristics.
  • 使用内存使用情况基线来选择 vCore 选项,使其正确匹配你的内存分配。Use the memory usage baseline to choose a vCore option that appropriately matches your memory allocation.
  • 使用文件子系统的基线 IO 延迟,在“常规用途”(延迟大于 5 毫秒)与“业务关键”(延迟小于 3 毫秒)服务层级之间进行选择。Use the baseline IO latency of the file subsystem to choose between General Purpose (latency greater than 5 ms) and Business Critical (latency less than 3 ms) service tiers.
  • 使用基线吞吐量来预分配数据和日志文件的大小,以实现预期的 IO 性能。Use the baseline throughput to preallocate the size of the data and log files to achieve expected IO performance.

可在部署期间选择计算和存储资源,然后在使用 Azure 门户之后对其进行更改,而不会导致应用程序停机。You can choose compute and storage resources during deployment and then change them after using the Azure portal without incurring downtime for your application.

重要

任何不符合托管实例虚拟网络要求的情况都可能导致无法创建新实例或使用现有实例。Any discrepancy in the managed instance virtual network requirements can prevent you from creating new instances or using existing ones. 详细了解如何 创建新的 和  配置现有的 网络。Learn more about creating new and configuring existing networks.

SQL Server VM 替代项SQL Server VM alternative

也有可能 Azure VM 上的 SQL Server 比 Azure SQL 托管实例更符合你的业务要求。Your business may have requirements that make SQL Server on Azure VMs a more suitable target than Azure SQL Managed Instance.

如果你的业务符合以下情况,请考虑改用 SQL Server VM:If the following apply to your business, consider moving to a SQL Server VM instead:

  • 需要直接访问操作系统或文件系统(例如,为了在装有 SQL Server 的同一个虚拟机上安装第三方代理或自定义代理)。If you require direct access to the operating system or file system, such as to install third-party or custom agents on the same virtual machine with SQL Server.
  • 严重依赖于目前尚不支持的功能,如 FileStream/FileTable、PolyBase 和跨实例事务。If you have strict dependency on features that are still not supported, such as FileStream/FileTable, PolyBase, and cross-instance transactions.
  • 绝对需要保持使用特定的 SQL Server 版本(如 2012)。If you absolutely need to stay at a specific version of SQL Server (2012, for instance).
  • 计算要求比托管实例的要求低得多(如只需一个 vCore),且数据库整合不可接受。If your compute requirements are much lower than managed instance offers (one vCore, for instance), and database consolidation is not an acceptable option.

迁移工具Migration tools

推荐的迁移工具是数据迁移助手和 Azure 数据库迁移服务。The recommended tools for migration are the Data Migration Assistant and the Azure Database Migration Service. 还有其他可替代的迁移选项。There are other alternative migration options available as well.

下表列出了推荐的迁移工具:The following table lists the recommended migration tools:

技术Technology 说明Description
Azure 数据库迁移服务 (DMS)Azure Database Migration Service (DMS) 支持在脱机模式下迁移的第一方 Azure 服务,适合能够在迁移过程中适应停机的应用程序。First party Azure service that supports migration in the offline mode for applications that can afford downtime during the migration process. 与联机模式下的连续迁移不同,脱机模式下的迁移将一次性完成从源到目标的完整数据库备份的还原。Unlike the continuous migration in online mode, offline mode migration runs a one-time restore of a full database backup from the source to the target.
本地备份和还原Native backup and restore SQL 托管实例支持本机 SQL Server 数据库备份(.bak 文件)的还原 (RESTORE),对于能够提供到 Azure 存储的完整数据库备份的客户而言,它是最简单的迁移选项。SQL Managed Instance supports RESTORE of native SQL Server database backups (.bak files), making it the easiest migration option for customers who can provide full database backups to Azure storage. 还支持完整备份和差异备份,本文后面的迁移资产部分中进行了介绍。Full and differential backups are also supported and documented in the migration assets section later in this article.

替代工具Alternative tools

下表列出了可替代的迁移工具:The following table lists alternative migration tools:

技术Technology 说明Description
事务复制Transactional replication 通过提供“发布者 - 订阅者”类型迁移选项,同时保持事务一致性,将数据从源 SQL Server 数据库表复制到 SQL 托管实例。Replicate data from source SQL Server database table(s) to SQL Managed Instance by providing a publisher-subscriber type migration option while maintaining transactional consistency.
大容量复制Bulk copy 批量复制程序 (bcp) 实用程序将数据从 SQL Server 实例复制到数据文件中。The bulk copy program (bcp) utility copies data from an instance of SQL Server into a data file. 使用 BCP 实用程序从源中导出数据,并将数据文件导入到目标 SQL 托管实例中。Use the BCP utility to export the data from your source and import the data file into the target SQL Managed Instance.

若要执行高速批量复制操作以将数据迁移到 Azure SQL 数据库,可使用智能批量复制工具,利用并行复制任务最大程度加快传输速度。For high-speed bulk copy operations to move data to Azure SQL Database, Smart Bulk Copy tool can be used to maximize transfer speeds by leveraging parallel copy tasks.
导入导出 Wizard / BACPACImport Export Wizard / BACPAC BACPAC 是扩展名为 .bacpac 的 Windows 文件,用于封装数据库的架构和数据。BACPAC is a Windows file with a .bacpac extension that encapsulates a database's schema and data. BACPAC 既可以用于从源 SQL Server 导出数据,也可以将文件导回 Azure SQL 托管实例。BACPAC can be used to both export data from a source SQL Server and to import the file back into Azure SQL Managed Instance.
Azure 数据工厂 (ADF)Azure Data Factory (ADF) Azure 数据工厂中的复制活动使用内置连接器和集成运行时将数据从源 SQL Server 数据库迁移到 SQL 托管实例。The Copy activity in Azure Data Factory migrates data from source SQL Server database(s) to SQL Managed Instance using built-in connectors and an Integration Runtime.

ADF 支持各种连接器,可将数据从 SQL Server 源迁移到 SQL 托管实例。ADF supports a wide range of connectors to move data from SQL Server sources to SQL Managed Instance.

比较迁移选项Compare migration options

比较迁移选项,选择适合你业务需求的路径。Compare migration options to choose the path appropriate to your business needs.

下表比较了推荐的迁移选项:The following table compares the recommended migration options:

迁移选项Migration option 何时使用When to use 注意事项Considerations
Azure 数据库迁移服务 (DMS)Azure Database Migration Service (DMS) - 大规模迁移单个数据库或多个数据库。- Migrate single databases or multiple databases at scale.
- 可在迁移过程中适应停机时间。- Can accommodate downtime during migration process.

支持的源:Supported sources:
- SQL Server (2005 - 2019) 本地或 Azure VM- SQL Server (2005 - 2019) on-premises or Azure VM
- AWS EC2- AWS EC2
- AWS RDS- AWS RDS
- GCP 计算 SQL Server VM- GCP Compute SQL Server VM
- 可以通过 PowerShell 自动进行大规模迁移。- Migrations at scale can be automated via PowerShell.
- 完成迁移的时间取决于数据库的大小,并受备份和还原时间的影响。- Time to complete migration is dependent on database size and impacted by backup and restore time.
- 可能需要足够的停机时间。- Sufficient downtime may be required.
本机备份和还原Native backup and restore - 迁移单个业务线应用程序数据库。- Migrate individual line-of-business application database(s).
- 无需单独的迁移服务或工具即可快速轻松地进行迁移。- Quick and easy migration without a separate migration service or tool.

支持的源:Supported sources:
- SQL Server (2005 - 2019) 本地或 Azure VM- SQL Server (2005 - 2019) on-premises or Azure VM
- AWS EC2- AWS EC2
- AWS RDS- AWS RDS
- GCP 计算 SQL Server VM- GCP Compute SQL Server VM
- 数据库备份使用多个线程来优化指向 Azure Blob 存储的数据传输,但是 ISV 带宽和数据库大小会影响传输速率。- Database backup uses multiple threads to optimize data transfer to Azure Blob storage but ISV bandwidth and database size can impact transfer rate.
- 停机时间应包含执行完整备份和还原所需的时间(这是数据操作的大小)。- Downtime should accommodate the time required to perform a full backup and restore (which is a size of data operation).

替代选项Alternative options

下表比较了替代迁移选项:The following table compares the alternative migration options:

方法/技术Method / technology 何时使用When to use 注意事项Considerations
事务复制Transactional replication - 通过持续将更改内容从源数据库表发布到目标 SQL 托管实例数据库表来进行迁移。- Migrate by continuously publishing changes from source database tables to target SQL Managed Instance database tables.
- 所选表的全部或部分数据库迁移(数据库子集)。- Full or partial database migrations of selected tables (subset of database).

支持的源:Supported sources:
- SQL Server (2012 - 2019),存在一些限制- SQL Server (2012 - 2019) with some limitations
- AWS EC2- AWS EC2
- GCP 计算 SQL Server VM- GCP Compute SQL Server VM

- 与其他迁移选项相比,设置相对复杂。- Setup is relatively complex compared to other migration options.
- 提供连续复制选项以迁移数据(无需使数据库脱机)。- Provides a continuous replication option to migrate data (without taking the databases offline).
- 在源 SQL Server 上设置发布服务器时,关于事务的复制,有一些限制需要考虑。- Transactional replication has a number of limitations to consider when setting up the Publisher on the source SQL Server. 请参阅对发布对象的限制了解详细信息。See Limitations on Publishing Objects to learn more.
- 具有监控复制活动的功能。- Capability to monitor replication activity is available.
大容量复制Bulk copy - 迁移全部或部分数据迁移。- Migrating full or partial data migrations.
- 可以适应停机时间。- Can accommodate downtime.

支持的源:Supported sources:
- SQL Server (2005 - 2019) 本地或 Azure VM- SQL Server (2005 - 2019) on-premises or Azure VM
- AWS EC2- AWS EC2
- AWS RDS- AWS RDS
- GCP 计算 SQL Server VM- GCP Compute SQL Server VM
- 从源导出数据并导入目标时需要停机时间。- Requires downtime for exporting data from source and importing into target.
- 导出/导入过程中使用的文件格式和数据类型需要与表架构一致。- The file formats and data types used in the export / import need to be consistent with table schemas.
导入导出 Wizard / BACPACImport Export Wizard / BACPAC - 迁移单个业务线应用程序数据库。- Migrate individual Line-of-business application database(s).
- 适用于较小的数据库。- Suited for smaller databases.
不需要单独的迁移服务或工具。Does not require a separate migration service or tool.

支持的源:Supported sources:
- SQL Server (2005 - 2019) 本地或 Azure VM- SQL Server (2005 - 2019) on-premises or Azure VM
- AWS EC2- AWS EC2
- AWS RDS- AWS RDS
- GCP 计算 SQL Server VM- GCP Compute SQL Server VM

- 需要停机,因为数据需要在源处导出并在目标处导入。- Requires downtime as data needs to be exported at the source and imported at the destination.
- 导出/导入中使用的文件格式和数据类型需要与表架构一致,以避免“截断”/“数据类型不匹配”错误。- The file formats and data types used in the export / import need to be consistent with table schemas to avoid truncation / data type mismatch errors.
- 导出包含大量对象的数据库所花费的时间可能会非常长。- Time taken to export a database with a large number of objects can be significantly higher.
Azure 数据工厂 (ADF)Azure Data Factory (ADF) - 从源 SQL Server 数据库迁移和/或转换数据。- Migrating and/or transforming data from source SQL Server database(s).
- 通常要为商业智能 (BI) 工作负载将多个数据源的数据合并到 Azure SQL 托管实例。- Merging data from multiple sources of data to Azure SQL Managed Instance typically for Business Intelligence (BI) workloads.
- 需要在 ADF 中创建数据移动管道,以便将数据从源移动到目标。- Requires creating data movement pipelines in ADF to move data from source to destination.
- 成本是一个重要的考虑因素,它取决于管道触发器、活动运行数、数据移动的持续时间等。- Cost is an important consideration and is based on the pipeline triggers, activity runs, duration of data movement, etc.

具有互操作性Feature interoperability

如果迁移的工作负载还依赖其他 SQL Server 功能,则还有其他注意事项。There are additional considerations when migrating workloads that rely on other SQL Server features.

SQL Server Integration ServicesSQL Server Integration Services

使用 Azure 数据库迁移服务 (DMS) 将 SSISDB 中的 SQL Server Integration Services (SSIS) 包和项目迁移到 Azure SQL 托管实例。Migrate SQL Server Integration Services (SSIS) packages and projects in SSISDB to Azure SQL Managed Instance using Azure Database Migration Service (DMS).

迁移中仅支持 SSISDB 中以 SQL Server 2012 开头的 SSIS 包。Only SSIS packages in SSISDB starting with SQL Server 2012 are supported for migration. 在迁移前转换旧 SSIS 包。Convert legacy SSIS packages before migration. 有关详细信息,请参阅项目转换教程See the project conversion tutorial to learn more.

SQL Server Reporting ServicesSQL Server Reporting Services

SQL Server Reporting Services (SSRS) 报表可迁移到 Power BI 中的分页报表。SQL Server Reporting Services (SSRS) reports can be migrated to paginated reports in Power BI. 使用  RDL 迁移工具帮助准备和迁移报告。Use the RDL Migration Tool to help prepare, and migrate your reports. 此工具由 Microsoft 开发,可帮助客户将 RDL 报表从其 SSRS 服务器迁移到 Power BI。This tool was developed by Microsoft to help customers migrate RDL reports from their SSRS servers to Power BI. 可在 GitHub 上使用该工具,它记录有迁移方案的端到端演练过程。It is available on GitHub, and it documents an end-to-end walkthrough of the migration scenario.

SQL Server Analysis ServicesSQL Server Analysis Services

可以将 SQL Server 2012 及更高版本中的 SQL Server Analysis Services 表格模型迁移到 Azure Analysis Services,这是 Azure 中 Analysis Services 表格模型的 PaaS 部署模型。SQL Server Analysis Services Tabular models from SQL Server 2012 and above can be migrated to Azure Analysis Services, which is a PaaS deployment model for Analysis Services Tabular model in Azure.

另外,还可以考虑使用新的 XMLA 读/写终结点将本地 Analysis Services 表格模型迁移到 Power BI PremiumAlternatively, you can also consider migrating your on-premises Analysis Services Tabular models to Power BI Premium using the new XMLA read/write endpoints.

备注

Power BI XMLA 读/写终结点功能当前为公共预览版,在正式发布之前,不应将其用于生产工作负载。Power BI XMLA read/write endpoints functionality is currently in Public Preview and should not be considered for Production workloads until the functionality becomes Generally Available.

高可用性High availability

由于常规用途(标准可用性模型)业务关键(高级可用性模型) SQL 托管实例中都已内置有高可用性体系结构,因此 SQL Server 高可用性功能 Always On 故障转移群集实例和 Always On 可用性组在目标 Azure SQL 托管实例上已过时。The SQL Server high availability features Always On failover cluster instances and Always On availability groups become obsolete on the target Azure SQL Managed Instance as high availability architecture is already built into both General Purpose (standard availability model) and Business Critical (premium availability model) SQL Managed Instance. 高级可用性模型还提供读取扩展,该扩展允许出于只读目的连接到某个辅助节点。The premium availability model also provides read scale-out that allows connecting into one of the secondary nodes for read-only purposes.

除了 SQL 托管实例中包含的高可用性体系结构之外,还有自动故障转移组功能,可借助该功能管理将托管实例中的数据库复制和故障转移到另一个区域的操作。Beyond the high availability architecture that is included in SQL Managed Instance, there is also the auto-failover groups feature that allows you to manage the replication and failover of databases in a managed instance to another region.

SQL 代理作业SQL Agent jobs

使用脱机 Azure 数据库迁移服务 (DMS) 选项来迁移 SQL Agent 作业Use the offline Azure Database Migration Service (DMS) option to migrate SQL Agent jobs. 其他情况下,使用 SQL Server Management Studio 在 Transact-SQL (T-SQL) 中编写脚本,然后在目标 SQL 托管实例上手动重新创建它们。Otherwise, script the jobs in Transact-SQL (T-SQL) using SQL Server Management Studio and then manually recreate them on the target SQL Managed Instance.

重要

目前,Azure DMS 仅支持涉及 T-SQL 子系统步骤的作业。Currently, Azure DMS only supports jobs with T-SQL subsystem steps. 涉及 SSIS 打包步骤的作业需要手动迁移。Jobs with SSIS package steps will have to be manually migrated.

登录名和组Logins and groups

在脱机模式下可以使用数据库迁移服务 (DMS) 将来自源 SQL Server 的 SQL 登录名移动到 Azure SQL 托管实例。SQL logins from the source SQL Server can be moved to Azure SQL Managed Instance using Database Migration Service (DMS) in offline mode. 使用“迁移向导”中的“选择登录名”边栏选项卡将登录名迁移到目标 SQL 托管实例 。Use the Select logins blade in the Migration Wizard to migrate logins to your target SQL Managed Instance.

默认情况下,Azure 数据库迁移服务仅支持迁移 SQL 登录名。By default, Azure Database Migration Service only supports migrating SQL logins. 但是,可通过以下方式启用迁移 Windows 登录名的功能:However, you can enable the ability to migrate Windows logins by:

确保目标 SQL 托管实例具有 Azure AD 读取访问权限,这可由具有“公司管理员”或“全局管理员”角色的用户通过 Azure 门户进行配置 。Ensuring that the target SQL Managed Instance has Azure AD read access, which can be configured via the Azure portal by a user with the Company Administrator or a Global Administrator" role. 配置 Azure 数据库迁移服务实例以启用 Windows 用户/组登录名迁移,这通过 Azure 门户在“配置”页上进行设置。Configuring your Azure Database Migration Service instance to enable Windows user/group login migrations, which is set up via the Azure portal, on the Configuration page. 启用此设置后,重启服务以使更改生效。After enabling this setting, restart the service for the changes to take effect.

重启服务后,Windows 用户/组登录名将出现在可用于迁移的登录名列表中。After restarting the service, Windows user/group logins appear in the list of logins available for migration. 对于迁移的所有 Windows 用户/组登录名,系统都会提示提供关联的域名。For any Windows user/group logins you migrate, you are prompted to provide the associated domain name. 不支持服务用户帐户(域名为 NT AUTHORITY 的帐户)和虚拟用户帐户(域名为 NT SERVICE 的帐户)。Service user accounts (account with domain name NT AUTHORITY) and virtual user accounts (account name with domain name NT SERVICE) are not supported.

若要了解详细信息,请参阅如何使用 T-SQL 将 SQL Server 实例中的 Windows 用户和组迁移到 Azure SQL 托管实例To learn more, see how to migrate windows users and groups in a SQL Server instance to Azure SQL Managed Instance using T-SQL.

或者,还可以使用由 Microsoft 数据迁移架构师专门设计的 PowerShell 实用程序工具Alternatively, you can use the PowerShell utility tool specially designed by the Microsoft Data Migration Architects. 该实用程序使用 PowerShell 创建一个 T-SQL 脚本来重新创建登录名,并从源中选择数据库用户到目标。The utility uses PowerShell to create a T-SQL script to recreate logins and select database users from the source to the target. 该工具自动将 Windows AD 帐户映射到 Azure AD 帐户,并且可以对照源 Active Directory 对每个登录名进行 UPN 查找。The tool automatically maps Windows AD accounts to Azure AD accounts, and can do a UPN lookup for each login against the source Active Directory. 该工具脚本自定义服务器和数据库角色,以及角色成员资格、数据库角色和用户权限。The tool scripts custom server and database roles, as well as role membership, database role, and user permissions. 当前不支持所包含的数据库,并且仅对可能的 SQL Server 权限的一部分进行了脚本编写。Contained databases are not currently supported and only a subset of possible SQL Server permissions are scripted.

加密Encryption

使用本机还原选项将 透明数据加密保护的数据库迁移到托管实例时,需要先将源 SQL Server 中的相应证书迁移到目标 SQL 托管实例,再还原数据库 。When migrating databases protected by  Transparent Data Encryption to a managed instance using native restore option, migrate the corresponding certificate from the source SQL Server to the target SQL Managed Instance before database restore.

系统数据库System databases

不支持还原系统数据库。Restore of system databases is not supported. 若要迁移实例级对象(存储在 master 或 msdb 数据库中),请使用 Transact-SQL (T-SQL) 对它们进行脚本编写,然后在目标托管实例上重新创建它们。To migrate instance-level objects (stored in master or msdb databases), script them using Transact-SQL (T-SQL) and then recreate them on the target managed instance.

利用高级功能Leverage advanced features

请确保利用 SQL 托管实例提供的基于云的高级功能。Be sure to take advantage of the advanced cloud-based features offered by SQL Managed Instance. 例如,你不用再操心备份管理,服务会为你管理。For example, you no longer need to worry about managing backups as the service does it for you. 可将数据库还原到某个保留期内的时间点You can restore to any point in time within the retention period. 此外,无需考虑设置高可用性,因为系统中内置了 高可用性Additionally, you do not need to worry about setting up high availability, as high availability is built in.

若要增强安全性,请考虑使用  Azure Active Directory 身份验证审核、 威胁检测、 行级别安全性和 动态数据掩码To strengthen security, consider using Azure Active Directory Authentication, auditing, threat detection, row-level security, and dynamic data masking.

除了高级管理和安全功能以外,SQL 托管实例还提供一组高级工具来帮助你监视和优化工作负载In addition to advanced management and security features, SQL Managed Instance provides a set of advanced tools that can help you monitor and tune your workload. 托管实例中的自动优化 会持续监视 SQL 计划执行统计信息的性能,并自动修复已确定的性能问题。Automatic tuning in managed instances continuously monitors performance of your SQL plan execution statistics and automatically fixes the identified performance issues.

只有将数据库兼容性级别更新到最新的兼容性级别 (150) 后,某些功能才可用。Some features are only available once the database compatibility level is changed to the latest compatibility level (150).

迁移资产Migration assets

如需更多帮助,请参阅以下资源,这些资源是为支持实际迁移项目而开发的。For additional assistance, see the following resources that were developed for real world migration projects.

资产Asset 说明Description
数据工作负荷评估模型和工具Data workload assessment model and tool 此工具为给定的工作负荷提供了建议的“最佳匹配”目标平台、云就绪和应用程序/数据库修正级别。This tool provides suggested "best fit" target platforms, cloud readiness, and application/database remediation level for a given workload. 它提供简单的一键式计算和报表生成功能,通过提供统一的自动化目标平台决策过程,帮助加速大规模评估。It offers simple, one-click calculation and report generation that helps to accelerate large estate assessments by providing and automated and uniform target platform decision process.
DBLoader 实用程序DBLoader Utility DBLoader 可用于将带分隔符的文本文件中的数据加载到 SQL Server 中。The DBLoader can be used to load data from delimited text files into SQL Server. 此 Windows 控制台实用程序使用 SQL Server 本机客户端大容量加载接口,该接口可在所有版本的 SQL Server(包括 Azure SQL MI)上运行。This Windows console utility uses the SQL Server native client bulkload interface, which works on all versions of SQL Server, including Azure SQL MI.
将本地 SQL Server 登录名迁移到 Azure SQL 托管实例的实用程序Utility to move On-Premises SQL Server Logins to Azure SQL Managed Instance PowerShell 脚本可创建一个 T-SQL 命令脚本来重新创建登录名并从本地 SQL Server 选择数据库用户到 Azure SQL 托管实例。A PowerShell script that creates a T-SQL command script to re-create logins and select database users from on-premises SQL Server to Azure SQL Managed Instance. 使用该工具可将 Windows AD 帐户自动映射到 Azure AD 帐户,还可以选择性地迁移 SQL Server 本机登录名。The tool allows automatic mapping of Windows AD accounts to Azure AD accounts as well as optionally migrating SQL Server native logins.
使用 Logman 自动执行 Perfmon 数据收集Perfmon data collection automation using Logman 用于收集 Perfmon 数据以了解基线性能的工具,该工具可帮助推荐迁移目标。A tool that collects Perform data to understand baseline performance that assists in the migration target recommendation. 该工具使用 logman.exe 创建命令,该命令可创建、启动、停止和删除远程 SQL Server 上设置的性能计数器。This tool that uses logman.exe to create the command that will create, start, stop, and delete performance counters set on a remote SQL Server.
白皮书 - 通过还原完整备份和差异备份将数据库迁移到 Azure SQL 托管实例Whitepaper - Database migration to Azure SQL Managed Instance by restoring full and differential backups 如果只有完整备份和差异备份(且没有日志备份功能),可借助此白皮书获取相关指导和了解相关步骤,加速完成从 SQL Server 到 Azure SQL 托管实例的迁移。This whitepaper provides guidance and steps to help accelerate migrations from SQL Server to Azure SQL Managed Instance if you only have full and differential backups (and no log backup capability).

这些资源是作为 Data SQL Ninja 计划的一部分开发的,该计划由 Azure 数据组工程团队提供赞助。These resources were developed as part of the Data SQL Ninja Program, which is sponsored by the Azure Data Group engineering team. Data SQL Ninja 计划的核心宗旨是解锁和加速复杂的现代化进程,并争取数据平台向 Azure 数据平台迁移的机会。The core charter of the Data SQL Ninja program is to unblock and accelerate complex modernization and compete data platform migration opportunities to Azure Data platform. 如果你认为贵组织有意参与 Data SQL Ninja 计划,请联系帐户团队并让他们提交提名。If you think your organization would be interested in participating in the Data SQL Ninja program, please contact your account team and ask them to submit a nomination.

后续步骤Next steps

若要开始将 SQL Server 迁移到 Azure SQL 托管实例,请参阅 SQL Server 到 SQL 托管实例的迁移指南To start migrating your SQL Server to Azure SQL Managed Instance, see the SQL Server to SQL Managed Instance migration guide.