Azure Arc for SQL server Migration- MI Link

Managed Instance Link Setup- Step By step path

The article explains how to prepare an environment for migrating SQL Server databases (enabled via Azure Arc) to Azure SQL Managed Instance using the Managed Instance link. This migration approach uses real-time replication through distributed availability groups, enabling online migration with minimal downtime. Since this option uses a Distributed Availability Group (DAG) hence before we start migration ,we need to set up a few things which we generally do while setting up AlwaysOn Availability group. All the required steps are detailed below and must be completed before starting the migration process. 

It focuses on ensuring compatibility, configuring SQL Server correctly, establishing secure connectivity, and preparing both source and target environments before initiating the migration.

Prerequisites

To successfully use the Managed Instance link migration, the following requirements must be met:

  • Azure requirements

    • Active Azure subscription

    • Azure SQL Managed Instance (target)

  • SQL Server requirements

    • SQL Server must be Azure Arc-enabled

    • Azure extension for SQL Server version 1.1.3238.349 or later

    • Supported SQL Server versions:

      • SQL Server 2016 SP3 and above

      • SQL Server 2017 CU31+

      • SQL Server 2019 CU20+

      • SQL Server 2022 / 2025 RTM

  • Permissions

    • Source SQL Server:

      • Sysadmin privileges (or least privilege with required elevation)

    • Target SQL Managed Instance:

      • Contributor / Owner role OR SQL Managed Instance Contributor role

  • Networking

    • Connectivity between SQL Server and Managed Instance:

      • VPN / ExpressRoute (for on-premises)

      • VNet peering or VNet-to-VNet (for Azure VMs)

    • Required ports:

      • Port 5022

      • Port range 11000–11999

Limitations

Key limitations of Managed Instance link migration include:

  • Migration limitations inherent to the Managed Instance link feature apply

  • Cancelling migration requires sysadmin permissions on the source server

  • Links created via Azure portal are not compatible with manually created links (SSMS/T-SQL)

  • Monitoring in Azure portal requires specific licensing eligibility

  • Reverse migration is limited (only supported for newer SQL Server versions)

Instance Preparations

Before starting migration, the SQL Server instance must be configured properly:

Core Configuration Steps

  • Validate SQL Server version and apply required updates

  • Restart SQL Server after configuration changes

Security & Encryption

  • Create a database master key in the master database

  • Import Azure trusted root certificates

Availability & Features

  • Enable Availability Groups

  • Enable Service Broker (if required)

  • Enable Accelerated Database Recovery (SQL Server 2019+)

Database Configuration

  • Set all databases to FULL recovery model

  • Take at least one full backup

Performance Optimization

  • Enable startup trace flags:

    • -T1800 → disk compatibility optimization

    • -T9567 → data compression for seeding

Networking Setup

  • Ensure required ports are open (5022, 11000–11999)

  • Configure firewall and NSG rules

  • Validate connectivity before migration

Instance Preparation takes a good amount of time as there are multiple things to set up along with decision making such as you need to Enable ADR only if you are migrating from SQL Server 2019 and above. So it's always better to spend more time on assessment and planning before starting any work related to Migration.  


Major Points to Remember

Important considerations for successful migration:

  • Managed Instance link enables near real-time migration with minimal downtime

  • Proper network configuration is critical—misconfigured ports can cause failures

  • SQL Server must be fully prepared and restarted after configuration changes

  • Certificates and encryption setup are mandatory for secure communication

  • Databases must be in FULL recovery mode with backups

  • Ensure feature compatibility (e.g., ADR, Service Broker) before migration

  • Test connectivity and environment readiness to avoid runtime issues

  • Always verify permissions and roles to prevent migration interruptions

Use Cases for Managed Instance Link

1) Near Zero-Downtime Migration

  • When business applications cannot tolerate long downtime windows

  • Managed Instance link uses near real-time replication, making it ideal for production systems that must remain online during migration

  • Example: Migrating a live e-commerce or banking system with continuous transactions

2) Gradual Cloud Adoption (Hybrid Strategy)

  • When organizations want to keep SQL Server on-premises while extending to Azure

  • Allows running workloads simultaneously on both environments

  • Example: A company testing Azure readiness while still relying on on-prem infrastructure

Disaster Recovery / Failover Scenarios

  • Useful for setting up a warm standby environment in Azure

  • In case of on-prem failure, workloads can fail over to Azure SQL Managed Instance

  • Example: Business continuity planning for critical enterprise systems

Offloading Read Workloads

  • Use Azure SQL Managed Instance as a read replica

  • Helps reduce load on the primary SQL Server

  • Example: Running reporting, analytics, or BI workloads in Azure without impacting production

Modernization Without Immediate Refactoring

  • When legacy applications rely heavily on SQL Server features

  • Managed Instance provides high compatibility, avoiding major code changes

  • Example: Moving a legacy ERP system to cloud without redesigning database logic

Data Synchronization Across Environments

  • Maintain continuous data synchronization between on-prem and Azure

  • Useful for distributed teams or multi-region access

  • Example: Global teams accessing consistent data across regions

Testing and Validation Before Full Cutover

  • Run parallel environments to validate performance and compatibility

  • Helps reduce migration risk

  • Example: QA teams validating application behavior on Azure before final switch

Regulatory or Compliance Constraints

  • When some data must remain on-prem but cloud capabilities are still needed

  • Hybrid setup allows selective migration

  • Example: Financial or government systems with strict data residency requirements


It's difficult to add complete detail about each and every step and I have tried to sum up all major points to start with. You must follow the MS link below to gain additional and detailed insights for proper setup and migration. 


https://learn.microsoft.com/en-us/sql/sql-server/azure-arc/migration-sql-mi-prepare-link?view=sql-server-ver17


Comments

Popular posts from this blog

SQL Server Installation Best Practices: Before and After Setup Checklist

How to Download and Install SQL Server 2025 (Step-by-Step Guide)

SQL Server Performance Optimization Who Is Responsible — DBA, Database Designer, or Developer