Migrate with the link - Azure SQL Managed Instance

Applies to: Azure SQL Managed Instance

This article teaches you to migrate your SQL Server database to Azure SQL Managed Instance by using the Managed Instance link.

For a detailed migration guide, review Migrate to Azure SQL Managed Instance

Overview

The Managed Instance link enables migration from SQL Server hosted anywhere, to Azure SQL Managed Instance. The link uses Always On availability group technology to replicate changes nearly in real time from the primary SQL Server instance to the secondary SQL Managed Instance. The link provides the only truly online migration option between SQL Server and Azure SQL Managed Instance, since the only downtime is cutting over to the target SQL managed instance.

Migrating with the link gives you:

  • The ability to test read only workloads on SQL Managed Instance before you finalize the migration to Azure
  • The ability to keep the link and migration running for as long as you need, weeks and even months at a time
  • Near real-time replication of data that provides the fastest available data replication to Azure
  • The most minimum downtime migration compared to all other solutions available today
  • Instantaneous cutover to the target SQL Managed Instance
  • The ability to migrate anytime you're ready
  • The ability to migrate single or multiple databases from a single or multiple SQL Server instances to the same or multiple SQL managed instances in Azure
  • The only true online migration to the Business Critical service tier

Note

While you can only migrate one database per link, you can establish multiple links from the same SQL Server instance to the same SQL Managed Instance.

Prerequisites

To use the link with Azure SQL Managed Instance for migration, you need the following prerequisites:

Assess and discover

After you've verified that your source environment is supported, start with the pre-migration stage. Discover all of the existing data sources, assess migration feasibility, and identify any blocking issues that might prevent your migration. In the Discover phase, scan the network to identify all SQL Server instances and features used by your organization.

You can use the following tools to discover SQL sources in your environment:

After data sources have been discovered, assess any on-premises SQL Server instances that can be migrated to Azure SQL Managed Instance to identify migration blockers or compatibility issues.

You can use the following tools to assess your source SQL Server instance:

For detailed guidance, review pre-migration.

Create target instance

After you've assessed your existing environment, and determined the appropriate service tier and hardware configuration for your target SQL managed instance, deploy your target instance by using the Azure portal, PowerShell or the Azure CLI

After your target SQL managed instance is created, configure a link between the database on your SQL Server instance and Azure SQL Managed Instance. First, prepare your environment and then configure a link by using SQL Server Management Studio (SSMS) or scripts.

Data sync and cutover

After your link is established, and you're ready to migrate, follow these steps (typically during a maintenance window):

  1. Stop workload on the primary SQL Server database so the secondary database on SQL Managed Instance catches up.
  2. Validate all data has made it over to the secondary SQL managed instance database.
  3. Fail over the link to the secondary SQL managed instance by choosing Planned failover.
  4. Cut over the application to connect to the SQL Managed Instance endpoint.

Validate migration

After you've cut over to the SQL managed instance target, monitor your application, test performance and remediate any issues.

For details, review post-migration.

For more information, see the following resources: