Choosing a Database Migration Path
This lesson explains online and offline migration, and the tools for each engine.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish online from offline migration.
- Compare Database Migration Service, Log Replay Service and Managed Instance link.
- Choose a tool from stated requirements.
Online and offline
The key decision is how long a database can be unavailable. In an offline migration, the application stops, data is copied, and the application restarts against the new database. It is simple, but downtime depends on the size of the data. In an online migration, an initial copy is followed by continuous replication of changes, and a short cutover is performed when the target has caught up. Downtime is minimal, but the process is more complex.
The target also matters, and the source engine determines the effort. A homogeneous migration keeps the same engine, such as SQL Server to Azure SQL. A heterogeneous migration changes the engine, such as Oracle to PostgreSQL, and needs schema and code conversion.
Homogeneous or heterogeneous?
Azure Database Migration Service
Azure Database Migration Service (DMS) is the managed service for moving databases at scale. For SQL Server, it supports online and offline migration to SQL Managed Instance and SQL Server on Azure virtual machines, and offline migration to Azure SQL Database. It can run through a private endpoint, but it does not migrate TDE-protected databases to every target, or logins, without additional steps.
Azure Data Studio, which once hosted the Azure SQL migration extension, was retired on 28 February 2026. Its replacement for SQL development is Visual Studio Code with the MSSQL extension, and the migration can be run from the Azure portal, Azure Arc, the Azure CLI or PowerShell. Older guidance that names Azure Data Studio should be read with that in mind.
Further options for SQL Managed Instance
Two additional tools target SQL Managed Instance.
Log Replay Service
Log Replay Service (LRS) is a free cloud service, which restores standard SQL Server backups from Blob Storage to SQL Managed Instance. It can run in autocomplete mode, or in continuous mode, in which logs are replayed until a final cutover. An LRS job can run for at most 30 days. It suits teams who want control, and those who already manage native backups.
Managed Instance link
The Managed Instance link uses distributed availability group technology to replicate databases from SQL Server to SQL Managed Instance in near real time. It gives the shortest cutover and suits mission-critical databases. It also allows reads on the managed instance during the migration, which reduces risk. It supports one-way failover from SQL Server 2016 to 2019, and two-way failover from SQL Server 2022 or 2025, given a matching update policy, which allows a real failback path.
The following comparison recaps the tools for SQL Server.
The following diagram shows the link and why the alternatives fall short.

Choosing a SQL migration tool
Other paths
Several other paths exist. SQL Server Migration Assistant (SSMA) converts schemas and migrates data from Oracle, Db2, MySQL, SAP ASE and Access to SQL Server and Azure SQL. Transactional replication can copy data to Azure SQL Database with minimal downtime. BACPAC exports provide an offline transfer for small databases. A native backup and restore from Blob Storage works for SQL Managed Instance and for SQL Server on virtual machines, but not for Azure SQL Database.
Open-source engines use the migration tools native to those services. Azure Database for PostgreSQL and MySQL each provide a migration service for offline and online moves, and native tools such as pg_dump and mysqldump suit small databases. MongoDB workloads can move to Azure Cosmos DB for MongoDB or Azure DocumentDB, keeping their existing drivers.
Choosing a target and tool
The following table recaps some common migration requirements.
| Requirement | Recommendation |
|---|---|
| SQL Server to Managed Instance, minimal downtime, managed service | Database Migration Service, online |
| SQL Server to Managed Instance, near-zero downtime, with failback | Managed Instance link |
| SQL Server to Azure SQL Database | Database Migration Service, offline |
| Oracle to Azure SQL | SQL Server Migration Assistant |
| Backups already in Blob Storage, to Managed Instance | Log Replay Service |
Migration tool by requirement
Minimal downtime migration
A hospital runs SQL Server 2022 with a 3 TB database, which uses SQL Server Agent and cross-database queries. It wants a PaaS target, a cutover of under five minutes, and the ability to return to on-premises SQL Server if a serious problem appears after cutover. Which solution should you recommend?
SQL Server Agent and cross-database queries point to SQL Managed Instance as the target. The Managed Instance link fits the migration requirement, as it replicates in near real time, gives a very short cutover, and on SQL Server 2022 it supports a two-way failover, which provides a return path.
Database Migration Service online would meet the downtime target, but it offers no failback. A backup and restore would need hours of downtime for 3 TB. Azure SQL Database does not support SQL Server Agent, so it is the wrong target, regardless of tool.
Can a native SQL Server backup be restored directly to Azure SQL Database?
Show answer
No. Native restore works for SQL Managed Instance and SQL Server on virtual machines.
Exam Tips
Remember for the exam
- Offline is simple, with downtime; online replicates changes for a short cutover.
- Database Migration Service: online to Managed Instance and SQL on VMs; offline to SQL Database.
- Managed Instance link gives the shortest cutover, and failback from SQL Server 2022.
- SSMA converts other engines to SQL targets.
- Azure Data Studio is retired.