Azure Database Migration Service: Moving Your Data to Azure Without Losing Sleep

Azure Database Migration Service: Moving Your Data to Azure Without Losing Sleep

An intermediate guide to planning and running database migrations with Azure Database Migration Service: assessment, target choice, offline and online methods, cutover, validation and the habits that keep a migration calm and reversible.

Imagine a family moving from an old house to a new one. They could pack everything, close the door, drive across town and unpack, leaving the house empty for a day or two. Or they could move room by room while still living there, carrying boxes gradually and finally switching the last few things on the final morning. The first way is simple but disruptive. The second takes more planning but lets daily life continue almost without a pause.

Moving a database to the cloud is much the same, except the family is a business application and the boxes contain its most precious asset: its data. Azure Database Migration Service is a managed service that helps carry that data from where it lives today to its new home in Azure, either in one quick trip or continuously until you are ready to switch. This tutorial explains the whole journey, from the first inventory to the last cleanup, so you can plan migrations that are predictable and safe.

1What Azure Database Migration Service Is and Why It Exists

Azure Database Migration Service, often shortened to DMS, is a managed Azure service that moves databases from a source system to a target in Azure with minimal effort and, when needed, minimal downtime.

The problem it solves

Databases are among the hardest things to move. They are large, they change every second, and almost every other part of the business depends on them. Copying files by hand is slow and risky. A copy taken at noon is already out of date by one o’clock, and a long copy of a busy database can leave the application unavailable for hours or days. Add the need to prove that nothing was lost, and a careless migration becomes a source of real fear.

Azure Database Migration Service takes over the mechanical parts of this work. It moves data in a controlled and monitored way, reports progress for each database, supports continuous synchronization so that downtime can be short, and lets you decide the exact moment to switch. It does not replace planning, but it removes a lot of manual and error-prone effort.

Simple Analogy

DMS is like a professional moving company with a tracking app. It brings the trucks, does the heavy lifting, keeps a list of every box and lets you watch progress, while you still decide which furniture to take and when the new house is ready.

What it supports

The service supports many kinds of sources and targets, including SQL Server, MySQL, PostgreSQL and MongoDB, moving to Azure services such as Azure SQL Database, Azure SQL Managed Instance, SQL Server on Azure virtual machines, Azure Database for MySQL, Azure Database for PostgreSQL and Azure Cosmos DB. The exact list of supported paths, and whether each path supports offline, online or both, changes as Microsoft adds features, so always confirm your specific route in the current documentation.

i
Good to Know

The Azure Database Migration Service experience has changed shape over the years, from an older standalone service to newer experiences built into other tools. Articles you find online may describe an older flow, so check which version of the experience the documentation is describing.

2Why Migrate and What Kind of Migration

Before choosing a tool, decide what you want from the move, because the goal shapes every later choice.

Common reasons to migrate

Reason

End of support

Old database versions stop receiving security updates, so staying put becomes a growing risk.

Reason

Data center exit

A company closes or shrinks its own data centers and must relocate everything inside them.

Reason

Less administration

Managed services take over patching, backups and high availability, freeing staff for more valuable work.

Reason

Scale and resilience

The cloud makes it easier to grow capacity and to spread systems across zones and regions.

Reason

Cost and licensing

Pay-as-you-go pricing, reserved capacity and licensing benefits can lower the total cost of ownership.

Reason

Modernization

Moving to a newer engine or a cloud-native database to unlock features the old system lacks.

Three broad strategies

StrategyWhat ChangesEffortTypical Target
Rehost, or lift and shiftThe same database software, moved to a virtual machine in AzureLowSQL Server on Azure virtual machines
ReplatformSame engine, but as a managed serviceMediumAzure SQL Managed Instance or Azure SQL Database
Refactor or re-engineerA different engine or a redesigned data modelHighAnother database family, such as PostgreSQL or Azure Cosmos DB
Simple Analogy

Rehosting is like moving your furniture into an identical apartment. Replatforming is like moving to an apartment where the landlord handles repairs. Refactoring is like downsizing and redesigning your whole lifestyle, which gives the most change but needs the most work.

!
Common Mistake

Choosing the most modern target without checking whether the application can use it. A refactor sounds attractive, but if the application depends on features that the new engine lacks, the project can stall for months.

3The Family of Migration Tools

DMS is one member of a toolkit, and knowing what each tool does prevents confusion about where it fits.

Tool

Azure Migrate

The central hub for discovering servers and databases, assessing readiness and estimating cost, across many kinds of workloads.

Tool

Azure Database Migration Service

The engine that moves the data itself, in offline or online mode depending on the route.

Tool

SQL Server Migration Assistant

A family of tools that assess and convert schema and code from other database types, such as Oracle or MySQL, into SQL Server or Azure SQL formats.

Tool

Migration assessments for SQL Server

Checks for compatibility problems and recommends a suitably sized Azure target, using the machine’s actual performance history.

Tool

Native database features

Backup and restore, log shipping, replication and the Managed Instance link, which can be used on their own or together with DMS.

Tool

Data integration services

Services such as Azure Data Factory, useful when you need to transform data or move specific tables rather than whole databases.

Simple Analogy

The toolkit resembles a relocation company’s full service. One team surveys the house and estimates the truck size, another translates the labels on foreign boxes, another drives the truck and another helps arrange the new rooms. DMS is the driver, but a good move needs all the roles.

Tooling changes over time

Microsoft has retired or replaced several tools in this area. Older standalone assessment tools and desktop-based migration experiences have been superseded by newer ones, including experiences inside the Azure portal and in Azure Arc. Because tool names and locations shift, this tutorial focuses on the concepts that stay stable, such as assessment, schema work, data movement, cutover and validation, and tells you to confirm the current tool for each step.

i
Stay Current

Before starting a project, read the current migration guide for your exact source and target. Choose the tools it recommends today, not the ones a colleague used two years ago.

4The Phases of a Database Migration

Every successful migration follows the same arc, whatever the databases involved.

flowchart LR
    D["1 Discover: find databases and dependencies"] --> A["2 Assess: check compatibility and size the target"]
    A --> C["3 Convert: fix schema and code where needed"]
    C --> M["4 Migrate: move the data"]
    M --> V["5 Validate: test data and application"]
    V --> CU["6 Cut over: switch the application"]
    CU --> O["7 Optimize: tune, secure and retire the old system"]
        
FIG 1 — The seven phases of a typical database migration
1

Discover

Build an inventory of databases, versions, sizes, owners and the applications that use them.

2

Assess

Find features that will not work in the target and decide how large and costly the target should be.

3

Convert

Change the schema or code where the target needs it. This phase is small for same-engine moves and large for engine changes.

4

Migrate

Copy the data using offline or online methods, watching progress and fixing any problems.

5

Validate

Confirm that data is complete and correct, and that the application and performance meet expectations.

6

Cut over

Stop writing to the old database, finish the last synchronization and point the application at the new one.

7

Optimize

Tune performance, harden security, adjust costs and eventually retire the old system.

Simple Analogy

The phases are like a house move done properly: take inventory, check the new house’s size, adjust what will not fit, carry the boxes, check nothing is broken, hand over the keys and then unpack and tidy.

!
Common Mistake

Jumping straight to the migration tool and treating discovery and assessment as optional. Most migration disasters trace back to something that a proper inventory or assessment would have revealed weeks earlier.

5Discovery and Assessment

You cannot safely move what you have not fully counted, so the first real work is finding out what exists and how ready it is.

Discovery

Discovery answers basic questions. Which database servers exist? Which versions and editions are they? How big is each database, and how fast is it growing? Which applications use it, who owns it, and what other databases does it talk to? The answers often surprise people, because old systems accumulate hidden connections, such as a reporting job that reads from three different servers or a forgotten application that writes to a shared table.

Dependency mapping

Dependencies decide the order of migration. If an application talks to two databases, moving only one may break it, or make it painfully slow if the databases end up far apart over a network link. Mapping dependencies lets you group databases and applications that must move together into the same wave, so that cutover does not split a working system in half.

Simple Analogy

Dependency mapping is like checking which friends carpool together before moving. If you relocate one person across town but leave their carpool partners behind, the daily trip gets much harder for everyone.

What assessment checks

Check

Compatibility issues

Features, commands or settings that the target does not support or supports differently.

Check

Blocking issues

Problems that must be fixed before migration is possible, as opposed to warnings you can accept.

Check

Readiness per target

A comparison showing how ready each database is for each possible Azure target, so you can choose with evidence.

Check

Sizing recommendation

A suggested size and service tier based on measured resource use, not guesses.

Check

Cost estimate

An approximate monthly cost for each target option, to compare with the current spending.

Check

Data and security risks

Items such as unsupported encryption features, special collations or very large objects that need attention.

i
Measure Real Load

Collect performance data over a period that includes your busiest days, such as month-end. Sizing from a quiet week leads to an undersized target that struggles at the worst moment.

6Choosing the Right Target

Azure offers several homes for a database, and each trades control against convenience.

TargetBest ForYou ManageTypical Limits
SQL Server on Azure virtual machinesFull compatibility, special features, minimal changeOperating system, patching, backups, high availabilityMore administration work remains
Azure SQL Managed InstanceNear-complete compatibility with less administrationDatabases and workload tuningSome server-level features differ
Azure SQL DatabaseModern applications, individual databases, elastic scaleDatabases and performance settingsNo instance-level features such as some cross-database operations
Azure Database for MySQLMySQL applications that want a managed serviceDatabases and configurationVersion and extension support varies
Azure Database for PostgreSQLPostgreSQL applications that want a managed serviceDatabases and configurationExtension and version support varies
Azure Cosmos DBGlobally distributed, flexible-schema workloadsData model and throughput settingsDifferent programming model from relational databases
flowchart TD
    Q1{"Need full SQL Server feature set or OS access?"} -->|Yes| VM["SQL Server on Azure virtual machines"]
    Q1 -->|No| Q2{"Need instance-level features and easy lift?"}
    Q2 -->|Yes| MI["Azure SQL Managed Instance"]
    Q2 -->|No| Q3{"Single database, modern app, elastic scale?"}
    Q3 -->|Yes| SQLDB["Azure SQL Database"]
    Q3 -->|No| REV["Revisit requirements or consider other engines"]
        
FIG 2 — A simplified way to think about choosing a SQL Server target
Simple Analogy

Choosing a target is like choosing how to live. A virtual machine is like renting an empty house: total freedom, but you fix the plumbing. Managed Instance is like a furnished apartment with maintenance included. Azure SQL Database is like a hotel room: simple and flexible, but you cannot knock down walls.

Sizing and service tiers

Each target comes in sizes and tiers that differ in processor power, memory, storage speed and availability features. The assessment’s sizing recommendation is a good starting point, but plan to review it after the workload runs in Azure. The cloud allows you to resize, so it is better to start slightly generous and tune downward than to start too small and suffer slowdowns during cutover week.

!
Common Mistake

Copying the size of the old server one-for-one. Old servers are often oversized for peak loads that rarely occur, or undersized and struggling. Base the target on measured use, not on the hardware you happen to own.

7Offline and Online Migration

The most important choice in the data movement phase is whether the application can stop while data is copied.

Offline migration

In an offline migration, the application stops writing to the source database, the data is copied in one pass, and the application is then pointed at the target. It is simpler and has fewer moving parts, but the downtime lasts as long as the copy takes. For a small or rarely used database, or one that can be taken down during a weekend, this is often perfectly fine.

Online migration

In an online migration, an initial copy is made while the source continues to serve users. The service then keeps applying new changes to the target, so the two stay almost identical. When you are ready, you stop writes briefly, let the last changes flow across and switch. Downtime shrinks to minutes because only the final small gap remains. The price is extra complexity, more preparation and the need to watch the synchronization.

AspectOfflineOnline
DowntimeDuration of the full copyShort; only the final cutover
ComplexityLowerHigher
Source impactConcentrated during the copySpread over a longer period
Best forSmaller databases, flexible maintenance windowsLarge or business-critical databases that cannot stop for long
Rollback easeStraightforward, the old database is untouchedNeeds a plan, especially after writes to the new database begin
Availability by routeWidely supportedSupported for selected sources and targets only
flowchart LR
    subgraph OFF["Offline migration"]
        O1["Stop application"] --> O2["Copy all data"] --> O3["Start application on target"]
    end
    subgraph ON["Online migration"]
        N1["Initial copy while app runs"] --> N2["Continuous change sync"] --> N3["Brief stop, final sync, switch"]
    end
        
FIG 3 — Where the downtime lies in offline and online migrations
Simple Analogy

Offline is like closing a shop for two days to move all the stock. Online is like quietly restocking the new shop at night while the old one stays open, then moving the final few items and changing the sign on the door in an afternoon.

i
Practical Tip

Estimate downtime in advance by measuring copy speed in a rehearsal. Total size divided by realistic throughput gives the offline duration, and it is almost always longer than the first guess.

8How the Service Works Under the Hood

A basic picture of the moving parts makes problems much easier to diagnose.

The main components

Part

Source database

The existing system, which must be reachable and have the right permissions and settings for migration.

Part

Migration service

The Azure resource that coordinates the migration, tracks state and shows progress for each database.

Part

Integration runtime or agent

Software, sometimes installed on a machine you control, that can reach the source and move the data into Azure.

Part

Staging storage

For some routes, an Azure storage location where backup files are placed before being restored on the target.

Part

Target database

The Azure destination, which must be created, sized and made reachable before the migration starts.

flowchart LR
    SRC["Source database server"] --> IR["Integration runtime or agent on a machine you control"]
    SRC --> BK["Backup files on a network share or in storage"]
    BK --> STG["Azure storage account"]
    IR --> DMS["Azure Database Migration Service"]
    STG --> DMS
    DMS --> TGT["Target database in Azure"]
    DMS --> MON["Status and progress in the Azure portal"]
        
FIG 4 — Typical components in a backup-based database migration
Simple Analogy

The components resemble a moving operation: the old house is the source, the foreman is the migration service, the truck driver is the integration runtime, the storage unit is the staging storage and the new house is the target.

Two common mechanisms

For SQL Server migrations, one common mechanism uses backups. Full and log backups of the source are placed somewhere the service can read, then restored onto the target in sequence. Online migration keeps restoring new log backups as they arrive. Other routes, such as for MySQL, PostgreSQL and MongoDB, use data-copy and change-capture methods that read the data and changes directly. The mechanism affects what you must prepare, such as backup locations or replication settings on the source.

!
Common Mistake

Forgetting that the machine running the integration runtime needs its own network access, permissions and capacity. If it is undersized or blocked by a firewall, the migration stalls even though both databases are healthy.

9SQL Server to Azure SQL Managed Instance

Managed Instance is a popular destination because it offers near-complete SQL Server compatibility without the burden of managing machines.

Why it is popular

Managed Instance supports many instance-level features that applications rely on, such as cross-database queries, the SQL Agent job scheduler and database mail. This makes it the easiest managed-service target for many existing applications, with minimal code change. Microsoft handles patching, backups and high availability.

How the migration works

1

Prepare the target

Create the managed instance, size it and place it in a network that can be reached from your on-premises systems.

2

Place backups where the service can read them

Use an Azure storage account, or a network share read by an integration runtime, and make sure backups are taken correctly and unbroken.

3

Start the migration and choose the mode

For offline mode, a full backup is restored. For online mode, the full backup is restored and then further log backups are applied continuously.

4

Watch progress

The portal shows each database’s state and the last backup applied, so you can see how far behind the target is.

5

Cut over when ready

Stop writes, take a final log backup, let it be applied and complete the cutover, which brings the database online for use.

Simple Analogy

Online migration with log backups is like a note-taking secretary copying every new page of a diary into a second diary, again and again, so that on the final day the second diary is only a page or two behind.

Other options for this target

Besides the migration service, Managed Instance offers a feature called the Managed Instance link, which uses a technology similar to availability groups to keep a copy of a database in Azure continuously updated, and allows a very short cutover or even testing a read copy in the cloud first. There is also a log replay approach that can be driven from scripts. These alternatives are worth knowing when you need finer control, or when your scenario is not covered by the migration service route.

i
Backup Discipline

For backup-based online migration, keep the log backup chain unbroken and avoid actions that restart it, such as taking extra full backups with the wrong options. A broken chain forces you to start again.

10SQL Server to SQL Server on Azure Virtual Machines

When you need complete control, or when the application depends on features no managed service offers, a virtual machine is the safest landing spot.

When to choose it

Virtual machine targets suit applications that need full operating system access, unusual third-party components, features not available in managed services, or a precise version of the software. They are also the quickest route for urgent moves, such as an end-of-support deadline, since they change the least. The cost is that you still manage the machine: patching, backups, high availability design and monitoring remain your job, although Azure provides tools to help.

Migration approach

The migration service can move databases to a SQL Server virtual machine using a backup-based method similar to the one for Managed Instance, in offline or online mode. Backups are restored on the virtual machine, and online mode keeps applying log backups until cutover. Because you control the virtual machine, you can also use traditional methods such as log shipping, backup and restore by hand or replication when they suit your situation.

Advantages

  • Maximum compatibility and minimal application change
  • Full control of the operating system and configuration
  • Supports features not available in managed services
  • Often the fastest way to leave an old data center

Trade-offs

  • You remain responsible for patching and maintenance
  • High availability and backup design are your job
  • Higher administration effort than managed targets
  • Less automatic benefit from cloud-native improvements
Simple Analogy

A virtual machine target is like moving your own furniture into a rented house. Nothing changes about how things look, which makes the move quick, but you are still the one who fixes a leaking tap.

!
Common Mistake

Treating a virtual machine as a permanent solution without a plan for the operating overhead. Many teams start with a rehost to meet a deadline, then plan a later move to a managed service and never schedule it.

11SQL Server to Azure SQL Database

Azure SQL Database is a fully managed service for individual databases, and it asks the most of the application in return for the least administration.

What is different

Azure SQL Database hosts single databases and elastic pools of databases, with no access to the operating system or to instance-level features. Some capabilities that applications use on a full SQL Server, such as cross-database queries in the traditional way, the SQL Agent scheduler or certain server-level settings, work differently or need alternatives. The assessment tool highlights these differences, and teams often have to change code or move jobs to other services.

Schema first, then data

For this target, migration usually begins by deploying the schema, which means the tables, indexes, views and code, to the new database. Then the data is copied into the existing structure. The migration service can handle the data movement, often in offline mode, and support for online mode depends on the current feature set. Because schema and data are handled as separate steps, it pays to test the schema deployment early, since compatibility problems show up at that stage.

1

Assess for blockers

Find unsupported features and plan code changes or alternatives for each one.

2

Deploy the schema

Create the structure in the target using a schema deployment tool, and fix errors.

3

Copy the data

Use the migration service to select tables and move their rows into the prepared schema.

4

Validate and cut over

Compare data, test the application and switch connections once satisfied.

Simple Analogy

It is like furnishing a hotel room. First the room is built and decorated to match your needs, which is the schema, and only then are your belongings brought in, which is the data. If the room cannot hold your wardrobe, you discover that early.

i
Many Databases

If you are moving a server with dozens of small databases, consider elastic pools. They let many databases share resources, which can be far cheaper than sizing each one separately.

12Open-Source Databases: MySQL and PostgreSQL

Popular open-source engines have managed Azure services of their own, and migration follows the same principles with different details.

MySQL

MySQL databases can be migrated to Azure Database for MySQL. Offline migration copies the data in one pass, while online migration uses the source’s change log, called the binary log, to keep applying new changes until cutover. Preparation includes enabling the right logging settings on the source, checking version compatibility and making sure users and permissions exist on the target.

PostgreSQL

PostgreSQL databases move to Azure Database for PostgreSQL. Azure provides a migration capability that can copy schema and data, and it supports online approaches that use the database’s logical replication to follow changes. Care is needed with extensions, since the target supports a defined list, and with settings on the source that enable replication of changes.

Check

Version support

Confirm that the target supports the source version, and plan an upgrade if necessary.

Check

Extensions and plugins

List what the application uses and confirm each is available on the target.

Check

Change capture settings

For online mode, enable the logging or replication options the method needs on the source.

Check

Users and permissions

Recreate accounts and grants on the target, since they may not move with the data.

Check

Character sets and collations

Confirm that text encoding matches, to avoid corrupted or differently sorted text.

Check

Network and firewall

Allow the migration path between source and target and secure it appropriately.

Simple Analogy

Moving between versions of the same engine is like moving a piano between two houses with the same door sizes. The details to check are the stairs, the door width and any special fittings, which are your extensions and settings.

!
Common Mistake

Assuming that a database that works on one version will behave identically on another. Version upgrades during migration can change behavior in subtle ways, so test the application against the target version before the cutover.

13MongoDB and Other Non-Relational Migrations

Document databases have a different shape, but the plan still starts with assessment and ends with careful validation.

MongoDB to Azure Cosmos DB

Azure Cosmos DB offers compatibility with the MongoDB programming interface, so applications can often keep their existing drivers. The migration service can copy collections from a MongoDB source into Cosmos DB, in offline mode and, for some routes, with continuous synchronization. Planning must address how data is spread across partitions, which affects performance and cost, and how throughput is provisioned.

Think about data modeling

In non-relational databases, performance often depends on how data is divided and how queries access it. A design that worked in the old system may be inefficient in the new one if one partition receives most of the traffic. Reviewing the main queries and choosing a sensible partitioning approach before migration prevents expensive surprises later.

Document collections

Each collection is migrated with its indexes and data, and the team checks that queries return the same results and run within acceptable times on the target.

Throughput planning

Capacity is provisioned according to measured load, with room for the migration itself, which can consume considerable throughput while data is being written.

Compatibility testing

Because compatibility is not always complete, the application is tested against the target for any operations or features that behave differently.

Simple Analogy

Moving a document database is like moving a library. The books are the same, but the shelving system decides how fast people find them. A poor shelving plan makes everyone queue at one shelf while the rest of the library sits empty.

i
Rehearse With Real Queries

Replay a sample of real application queries against the target during testing. Synthetic tests rarely reveal the hot partitions and slow queries that real traffic does.

14Changing Engines: Schema and Code Conversion

When the source and target are different database families, the data is only part of the work, and the logic around it needs translating.

Why conversion is needed

Each database engine has its own data types, functions, procedural language and behavior. A stored procedure written for one engine usually cannot run unchanged on another. Moving from Oracle to PostgreSQL, or from MySQL to SQL Server, means converting the table definitions, the programmed logic and sometimes the queries inside the application.

Conversion tools

Assistant tools exist that read the source, assess how much can be converted automatically, convert what they can, and flag the rest for manual work. Typical tools in this family cover several source engines and produce a report of the effort needed. The automatic part is often the majority, but the remaining manual part usually contains the trickiest business logic and dominates the schedule.

1

Assess the source

Measure how much code and schema can convert automatically, and estimate the manual effort.

2

Convert the schema and code

Generate target structures and translated procedures, then fix anything flagged.

3

Adjust the application

Update queries, drivers and any engine-specific behavior in the application code.

4

Move the data

Copy data into the converted schema, handling type differences and special values.

5

Test deeply

Compare results between old and new systems for the same inputs, including edge cases and reports.

Simple Analogy

Changing engines is like translating a book into another language. A tool can translate most sentences, but idioms, jokes and local references need a human who understands the story.

ANTI-PATTERN-01 Avoid
Problem

A team trusts the automatic conversion report, schedules based on the high percentage converted, and discovers the hard remaining logic only near the deadline.

Why It’s Harmful

The last small percentage of code often holds the most complex business rules. Underestimating it delays the project, creates pressure to skip testing and risks subtle behavioral differences in production.

Correct Approach

Inspect the unconverted items early, estimate them individually, test converted logic against real data and keep schedule buffer for the manual part.

15Networking and Connectivity

Many stalled migrations are really network problems in disguise.

Reaching Azure from your network

Data has to travel from the source to Azure, and the speed and reliability of that path decides how long the migration takes. Organizations usually choose between a site-to-site virtual private network over the internet and a dedicated private circuit such as Azure ExpressRoute. Dedicated circuits give more predictable bandwidth and lower latency, which matters for large, continuous synchronization, while a virtual private network is quicker to set up for smaller moves.

OptionStrengthWeaknessGood For
Public internet with encryptionFastest to startVariable speed, exposure to internet routesSmall, low-risk moves and rehearsals
Site-to-site VPNPrivate encrypted tunnel, quick to deployBandwidth limited by internet connectionModerate data volumes
ExpressRouteDedicated, predictable, high bandwidthLonger lead time and higher costVery large or long-running migrations
Offline data transfer devicesAvoids network limits entirelySlow turnaround, not for continuous syncHuge initial datasets with poor bandwidth

Firewalls and private endpoints

Both source and target usually sit behind firewalls. You must allow traffic between the migration components and each database on the correct ports, and keep those openings narrow. For targets, private endpoints let you reach Azure services over private addresses, and you can often disable public access entirely once the migration is finished. Name resolution is another common trap, since the migration components must resolve the database names correctly from where they run.

flowchart LR
    OP["On-premises network: source database"] --> FW["Firewall allowing only required ports"]
    FW --> LINK["VPN or ExpressRoute private link"]
    LINK --> VN["Azure virtual network"]
    VN --> PE["Private endpoint to target database"]
    VN --> ST["Staging storage with restricted access"]
        
FIG 5 — A private network path between source and target
Simple Analogy

Network planning is like the road between two houses. A narrow country lane, a toll road and a private motorway all reach the destination, but how many trucks can go per hour, and how safe the route is, differs enormously.

i
Test the Pipe

Run a throughput test between the source network and Azure before committing to a schedule. Real measured speed is the single most useful number for predicting how long data movement will take.

16Security and Permissions During Migration

A migration touches your most sensitive data and holds powerful credentials, so it needs careful protection.

Principles to follow

Principle

Least privilege

Give the migration identities only the rights needed on source and target, and only for the migration period.

Principle

Encryption in transit

Use encrypted connections between source, migration components and target, and avoid unencrypted channels.

Principle

Protected credentials

Store passwords and keys in a secure vault, not in scripts, spreadsheets or chat messages.

Principle

Private connectivity

Prefer private links and private endpoints over public exposure of the databases.

Principle

Secure staging

Lock down storage that holds backup files, use short-lived access and delete the files after migration.

Principle

Clean up afterwards

Remove temporary accounts, firewall openings and access tokens once the migration is complete.

Protecting data copies

Backup files and intermediate copies are full copies of production data. If they sit in an open storage container or on a shared drive after the migration, they are a data breach waiting to happen. Treat every copy with the same care as the original, record where copies exist and make deleting them a formal step of the plan.

Compliance considerations

Regulated data may be subject to rules about where it is stored and who can handle it. Check that the target region satisfies data residency requirements, that staff and contractors with migration access are authorized and that audit logs capture the activity. In regulated industries, the migration plan often needs approval from security and compliance teams before it starts.

Simple Analogy

Moving sensitive data is like moving the contents of a bank vault. You use an armored truck, a sealed route, named guards and a signed handover, and you do not leave the old vault door open afterwards.

!
Common Mistake

Leaving migration accounts, firewall rules and backup files in place for months after the project ends. These forgotten leftovers become easy targets precisely because nobody remembers they exist.

17Running a Migration Step by Step

A calm migration is the product of repeated rehearsal, not heroic effort on the night.

1

Prepare the target environment

Create networks, the target service, storage, identities and monitoring, and verify connectivity from the source side.

2

Prepare the source

Check backups, enable any required logging or replication settings, create migration accounts and note the current state.

3

Run a rehearsal migration

Migrate a copy or a pilot database end to end. Record timings, problems and fixes in a runbook.

4

Test the application against the rehearsal target

Run functional, performance and reporting tests on the migrated copy and fix issues found.

5

Start the real migration

Begin the initial copy early, well before the planned cutover, and watch for failures.

6

Cut over

Follow the rehearsed steps, with clear roles and a go or no-go decision point.

7

Stabilize and close out

Watch closely for a period, keep the old system available as a fallback, then decommission it on schedule.

Simple Analogy

Rehearsing a migration is like a theatre dress rehearsal. The actors know their cues, the stage crew has solved the awkward costume changes, and opening night has no surprises beyond the audience.

The runbook

A runbook is a written, numbered procedure for the cutover, with owners, expected durations, checks and decision points. It should be detailed enough that a competent colleague could follow it at three in the morning. Update it after each rehearsal so it reflects what really worked, including the exact commands, screens and contact numbers.

i
Practice Twice

At least two full rehearsals are common for important systems. The first finds the problems, and the second proves that the fixes work and that the timings are realistic.

18Monitoring a Migration in Progress

While data is moving, the migration service reports a state for each database, and reading these states is a daily habit.

States of a database migration

stateDiagram-v2
    [*] --> Queued
    Queued --> InitialCopy
    InitialCopy --> Syncing
    InitialCopy --> Failed
    Syncing --> ReadyForCutover
    Syncing --> Failed
    ReadyForCutover --> CuttingOver
    CuttingOver --> Completed
    CuttingOver --> Failed
    Completed --> [*]
    Failed --> [*]
        
FIG 6 — A simplified view of states a database passes through during an online migration

The exact names differ between routes, but the idea is stable. A database waits in a queue, receives its initial copy, and in online mode moves into a continuous sync state. When it has caught up, it shows that it is ready for cutover. After cutover is triggered and finished, it is complete. A failure at any stage shows an error with details that guide the fix.

What to watch

Signal

Lag

How far behind the target is, such as the last applied backup or change. Growing lag means the migration is not keeping up.

Signal

Throughput

How fast data is moving. A sudden drop often points to a network or resource problem.

Signal

Errors and retries

Repeated errors on one table or file are a clue to a specific data or permission problem.

Signal

Source load

Watch processor and disk on the source, since migration reads can slow a busy production system.

Signal

Target load

The target may need temporary extra capacity while it ingests data.

Signal

Integration runtime health

Make sure the machine moving the data is online, healthy and not running out of memory or disk.

Simple Analogy

Monitoring is like watching a parcel tracking page. You are not worried while the status changes steadily, but a parcel that stops moving for hours tells you to pick up the phone.

!
Common Mistake

Starting an online migration, walking away and returning on cutover night to discover that it failed days ago. Set up alerts and check status daily, so that problems are found while there is time to fix them calmly.

19The Cutover

Cutover is the moment of truth: the instant that the new database becomes the real one.

The sequence

sequenceDiagram
    participant T as Team
    participant A as Application
    participant S as Source database
    participant D as Migration service
    participant G as Target database
    T->>A: Stop or pause writes
    A->>S: No more changes arrive
    T->>S: Take final backup or confirm last changes
    S->>D: Last changes delivered
    D->>G: Apply last changes
    T->>D: Complete cutover
    D->>G: Database brought online
    T->>A: Point connections to target
    A->>G: Normal operation resumes
    T->>T: Run validation checks
        
FIG 7 — The core steps of a controlled cutover

Go or no-go

Before pressing the final button, the team confirms a short checklist: the target has caught up, validation checks are ready, the application change is prepared, the rollback plan is understood, and the right people are present. If any item fails, the decision to stop and postpone is a sign of discipline, not failure. A postponed cutover costs a few hours; a rushed cutover that corrupts data costs far more.

The rollback plan

A rollback plan says how you will return to the old system if the new one misbehaves. Before writes begin on the target, rollback is easy: point the application back at the source. After the target accepts new writes, the two diverge, and rolling back means either losing those changes or copying them back. Decide in advance a point of no return, and for critical systems consider setting up reverse synchronization so a fallback remains possible for a while.

Simple Analogy

Cutover is like switching a train line onto a new track. You stop the trains, align the points, check the signals, and only then let traffic through. If the track looks wrong, you stop before the first train, not after it is on the bridge.

i
Timing

Schedule cutover for a quiet period, with the whole team rested and available. Avoid cutting over right before a holiday, a month-end close or any other critical business peak.

20Validation and Testing

A migration is not finished when the tool says completed; it is finished when you can prove that everything works.

Layers of validation

Layer 1

Structure

Compare the lists of tables, indexes, constraints, views and procedures between source and target.

Layer 2

Data completeness

Compare row counts per table and totals for key business values such as sums of amounts.

Layer 3

Data correctness

Compare samples or checksums of data to catch silent changes, such as altered precision, encoding or time zones.

Layer 4

Application behavior

Run functional tests and key business processes end to end against the target.

Layer 5

Performance

Compare response times and resource use of important queries and batch jobs with the old baseline.

Layer 6

Operations

Confirm backups, monitoring, alerts, security settings and scheduled jobs all work on the new system.

Simple Analogy

Validation is like checking a moved house. You count the boxes, check that the china is unbroken, switch on every light and tap, and make sure the heating works before you declare the move finished.

Establish a baseline first

You cannot say whether performance is good or bad without a record of how the old system behaved. Capture query timings, resource use and batch durations before migration, ideally across a busy period. After migration, compare like with like. Differences can reveal missing indexes, outdated statistics or settings that need adjusting.

!
Common Mistake

Validating only that the number of rows matches. Row counts can match while values are altered, truncated or shifted by a time zone. Always include checks on actual values and on business totals.

21What the Service Does Not Move

A database does not live alone, and several things around it need separate handling.

The hidden extras

Migrating the data and schema does not always carry over everything that makes the system work. Depending on the route, items such as server logins, database-level permissions, scheduled jobs, linked servers, alerts, custom messages, server settings and integration packages may need to be recreated or migrated using separate tools. Some newer experiences can migrate logins, but you should confirm the coverage for your route and always verify afterwards.

ItemWhy It MattersTypical Approach
Logins and permissionsUsers cannot connect or may have wrong rightsUse login migration features or scripts, then test each account
Scheduled jobsNightly processes silently stop runningRecreate in the target scheduler or move to another automation service
Linked servers and external connectionsQueries that reach other systems failRecreate and test, or redesign the integration
Server-level settingsBehavior differs from the old systemCompare and set equivalent options where allowed
Integration and reporting packagesData feeds and reports breakMove or redeploy, and change connection details
Application connection stringsApplications keep talking to the old databaseUpdate through configuration, with a controlled switch
Simple Analogy

Data and schema are the furniture. Logins, jobs and connections are the utilities, keys and mail forwarding. A new house with all your furniture but no electricity and no keys is not yet a home.

ANTI-PATTERN-02 Avoid
Problem

The team migrates databases successfully but discovers on the first Monday that nightly jobs did not run and some users cannot sign in.

Why It’s Harmful

Missing jobs can silently stop billing, reporting or data cleanup for days. Login problems turn a technically successful migration into an outage for users.

Correct Approach

Inventory every object outside the database during discovery, add each to the migration plan and test them in rehearsal, including a full scheduled cycle.

22After the Move: Optimization and Cleanup

The migration is the beginning of life in the new home, and a few weeks of care make it a good one.

Performance tuning

A freshly migrated database may need housekeeping. Statistics that guide the query planner may be outdated and should be refreshed. Indexes may need review, since the new hardware and storage characteristics differ. If the engine version changed, some queries may behave differently under new optimizer rules, and built-in query history tools can help find regressions and fix them. Compare against your baseline and tune where the numbers have worsened.

Right-sizing

Initial sizing is a guess based on assessment data. After a few weeks of real usage, review actual resource use and adjust the tier, scaling down where capacity is idle and up where it is stretched. The cloud makes resizing easy, so continuous adjustment is normal practice.

Security and protection

Task

Backups and recovery

Confirm backup schedules, retention and a tested restore procedure on the new platform.

Task

Threat protection

Enable security monitoring features and vulnerability assessments for the new databases.

Task

Network lockdown

Remove temporary firewall openings and disable public access if private endpoints are in use.

Task

Access review

Remove migration accounts and verify that application and user permissions follow least privilege.

Task

Monitoring and alerts

Set up dashboards and alerts for performance, availability and cost in the new environment.

Task

Decommission the old system

After the agreed fallback period, archive what is required, securely wipe the rest and retire the old servers.

Simple Analogy

Post-migration care is like settling into a new home: adjust the thermostat, rearrange the furniture that does not fit, fix the squeaking door, change the locks and finally return the keys to the old landlord.

i
Hypercare Period

Plan an intensive support period of a couple of weeks after cutover, with the project team on hand. Most remaining issues appear in the first few busy cycles.

23Cost and Licensing

The price of a migration includes more than the price of the migration service itself.

Cost drivers

Target
Compute, storage and backup of the new database
Transfer
Network links, staging storage and runtime machines
Overlap
Paying for old and new systems during the transition

Pricing of the migration service itself differs by route and has changed over time, with some paths available at no extra charge and others billed by usage, so check the current pricing page for your scenario. The larger costs are usually the target environment, the people doing the work, and the period when both old and new systems run side by side. A long, drawn-out migration therefore costs more than a quick, well-rehearsed one.

Licensing benefits

Organizations that already own licenses for database software with active software assurance may be able to use them in Azure through the Azure Hybrid Benefit, which can reduce the compute cost of the target significantly. Reserved capacity, which means committing to a level of usage for a year or more, gives further discounts for stable workloads. Extended security updates for older versions are another factor, since moving to Azure can provide them for products that have reached end of support. Always confirm the current terms with Microsoft or your reseller.

1

Estimate using assessment data

Use the recommended size and the cost estimate as the starting budget for each database.

2

Include the temporary costs

Add network links, runtime machines, storage for backups and the dual running period.

3

Apply licensing and commitments

Use hybrid benefit and reservations where they fit, after the workload size has stabilized.

4

Review after go-live

Right-size using real usage and remove temporary resources promptly.

Simple Analogy

The cost of moving house is not just the van hire. It includes the deposit on the new home, overlapping rent during the transition, boxes and time off work. Planning for all of them avoids a nasty surprise.

!
Common Mistake

Committing to long-term reservations before the workload is stable in Azure. Wait until real usage is measured, then reserve capacity for the steady part of the load.

24Migrating at Scale: Waves and Factories

Moving hundreds of databases calls for a repeatable process, not a series of one-off projects.

Wave planning

A wave is a group of databases and applications migrated together. Early waves contain small, low-risk, low-dependency systems, so the team learns the process and fixes the playbook. Later waves handle larger and more critical systems with confidence. Grouping by dependency, business owner, technology and acceptable downtime keeps each wave coherent and manageable.

flowchart LR
    W0["Wave 0: pilot with low-risk databases"] --> W1["Wave 1: similar small systems, refine playbook"]
    W1 --> W2["Wave 2: medium systems with moderate dependencies"]
    W2 --> W3["Wave 3: critical systems with online migration"]
    W3 --> W4["Wave 4: special cases and engine changes"]
        
FIG 8 — Waves that grow from low-risk pilots to critical systems

The migration factory

At scale, organizations build a factory: a standard process, shared tooling, templates for networks and targets, automated checks and a dedicated team. Each database passes through the same stations of assessment, preparation, migration, validation and handover, and lessons from each wave improve the next. Automation of repeated tasks, such as target creation and validation reports, saves enormous time.

Advantages of the factory approach

  • Predictable timelines and costs per database
  • Lessons learned improve every later wave
  • Consistent security and quality standards
  • Easier reporting for leadership

Trade-offs

  • Needs upfront investment in process and automation
  • Unusual systems do not fit the standard path
  • Requires strong coordination with application owners
Simple Analogy

Migrating hundreds of databases is like moving a whole neighbourhood. You start with the smallest homes to practise, build a standard checklist and a trained crew, and only then tackle the big, complicated houses.

i
Communicate Early

Tell application owners and business users the migration date, the expected downtime and what to test, weeks in advance. Surprise is the main reason a technically perfect migration is judged a failure.

25Design Patterns and Anti-Patterns

Teams that migrate smoothly share habits, and teams that struggle share traps.

Patterns worth adopting

Assess, then decide

The target and method are chosen from assessment evidence about compatibility, size and downtime tolerance, not from habit or preference.

Rehearse until boring

Full rehearsal migrations are run and timed until the cutover is a routine sequence with no surprises.

Pilot before scale

A small, low-risk database goes first, and what is learned is written into the playbook for every later wave.

Keep the fallback alive

The source remains intact and available for an agreed period after cutover, so a serious problem can be reversed with limited damage.

Automate repetition

Target creation, validation reports and cleanup are scripted, so every database follows the same safe path.

Traps to avoid

ANTI-PATTERN-03 Avoid
Problem

The team plans a single big-bang cutover of a critical database with no rehearsal, relying on the assessment and the tool’s reputation.

Why It’s Harmful

Unknown timings, permission gaps and application surprises appear during the cutover itself, when pressure is highest and options are fewest. A failure can mean extended downtime or data loss.

Correct Approach

Rehearse the full migration at least once or twice, record timings, write a detailed runbook and set clear go and no-go criteria.

ANTI-PATTERN-04 Avoid
Problem

The migration is run by the database team alone, with application owners, network teams and security teams informed only at the end.

Why It’s Harmful

Connection strings, firewall rules, access approvals and testing resources are not ready, so the schedule slips and the application team cannot validate in time.

Correct Approach

Form a joint team from the start, with named owners for the database, application, network, security and business testing.

ANTI-PATTERN-05 Avoid
Problem

An online migration is left running for months because the cutover keeps being postponed, and the source is never cleaned up after the project.

Why It’s Harmful

Costs double, the source system continues to age without support, and the risk of drift, failed synchronization and forgotten access grows with every week.

Correct Approach

Set a firm cutover date, keep synchronization windows short and schedule decommissioning of the old system as part of the project plan.

26Best Practices and Real-World Scenarios

A short checklist, followed by examples of the ideas working together.

Best practices

  • Inventory databases, dependencies and surrounding objects first
  • Choose target and method using assessment evidence
  • Test network throughput before fixing the schedule
  • Rehearse the full migration and write a runbook
  • Validate values and business totals, not only row counts
  • Keep a fallback and clean up access after the project

Common mistakes

  • Skipping assessment and discovering blockers late
  • Sizing the target by copying the old hardware
  • Forgetting logins, jobs and connections
  • Leaving online migrations unmonitored for days
  • Cutting over during business peaks
  • Leaving backup files and migration accounts behind

Real-world scenarios

A retailer escaping an unsupported server

A retailer runs an old SQL Server version nearing end of support. Assessment shows the application relies on agent jobs and cross-database queries, so the team chooses a managed instance as the target. Online migration over a dedicated link keeps the shop running, and the final cutover takes place on a quiet Sunday night with a rehearsed runbook, finishing in under an hour.

A software company moving many small databases

A software company hosts hundreds of customer databases on a few servers. It runs a pilot wave of ten small databases, builds scripts for target creation and validation, and then migrates in weekly waves into elastic pools. The standardized process cuts cost per database and finishes the entire estate in a few months.

A bank changing database engines

A bank moves a proprietary database to an open-source managed service to reduce licensing cost. Conversion tools handle most of the schema, but a team of developers manually rewrites complex business procedures. Parallel runs compare results between old and new systems for several weeks before the final cutover.

sequenceDiagram
    participant PM as Project team
    participant AS as Assessment tools
    participant DM as Migration service
    participant APP as Application owners
    participant OPS as Operations
    PM->>AS: Inventory and assess databases
    AS-->>PM: Readiness report and sizing
    PM->>DM: Rehearsal migration
    DM-->>PM: Timings and issues
    PM->>APP: Test application on rehearsal target
    APP-->>PM: Sign-off or fixes
    PM->>DM: Production migration and cutover
    DM-->>OPS: Database online in Azure
    OPS->>PM: Hypercare, tuning and decommissioning
        
FIG 9 — Roles and handovers across a well-run migration

27Frequently Asked Questions

Q1What is Azure Database Migration Service?

It is a managed Azure service that moves databases from a source system to Azure targets, offering offline and, for supported routes, online migration with continuous synchronization to keep downtime short.

Q2What is the difference between offline and online migration?

Offline migration stops the application while data is copied, so downtime lasts as long as the copy. Online migration copies data while the application runs and keeps applying changes, so downtime is limited to a short final cutover.

Q3Which targets can I migrate SQL Server to?

The main choices are SQL Server on Azure virtual machines, Azure SQL Managed Instance and Azure SQL Database. They trade off compatibility and control against the amount of administration you hand over to Azure.

Q4Does the service move logins and scheduled jobs?

It depends on the route and tool. Some experiences can migrate logins, but jobs, linked servers and other server-level items often need separate handling. Always inventory them and verify after migration.

Q5Do I need an assessment before migrating?

Yes, it is strongly recommended. Assessment finds compatibility problems, recommends a target size and estimates cost, and avoids discovering blockers during the cutover.

Q6How long will my migration take?

It depends on data size, network throughput, how busy the source is and the route used. Measure throughput with a test and run a rehearsal to get a realistic estimate rather than relying on theoretical numbers.

Q7What if the migration fails during cutover?

Before writes begin on the target, you can usually point the application back to the source. Define the point of no return in advance, keep the source intact for a fallback period and consider reverse synchronization for critical systems.

Q8Can I migrate between different database engines?

Yes, but it needs schema and code conversion in addition to data movement. Conversion tools handle much of the work automatically, while complex logic usually needs manual rewriting and thorough testing.

Q9Is my data safe during migration?

It can be, if you use encrypted connections, least-privilege accounts, private connectivity, protected credentials and secure staging storage, and remove all temporary access and copies afterwards.

Q10How much does it cost?

Charges for the service itself depend on the route and have changed over time, so check current pricing. The larger costs are usually the target environment, supporting infrastructure and the period of running old and new systems together.

Q11Where should a first-time team start?

Begin with an inventory and assessment, pick a small low-risk database as a pilot, rehearse the migration end to end, write a runbook and learn from the pilot before tackling critical systems.

28Summary and Key Takeaways

Azure Database Migration Service helps move databases to Azure with controlled, monitored data transfer, in offline or online modes depending on the route. Successful migrations begin long before the tool runs, with discovery, dependency mapping and assessment, and they end long after, with validation, tuning, security cleanup and decommissioning. The right target depends on how much compatibility, control and administration you need, and the right method depends on how much downtime the business can accept. Rehearsal, clear runbooks, careful networking, attention to items outside the database and a tested fallback turn migration from a gamble into a routine. Tools and features in this area change often, so confirm the current guidance for your exact source and target before you start.

Key Takeaways

  • Plan before you move — discovery, dependency mapping and assessment prevent most migration surprises.
  • Choose the target deliberately — virtual machines, Managed Instance and Azure SQL Database trade compatibility and control against administration effort.
  • Match method to downtime tolerance — offline is simpler, online keeps downtime short but needs more preparation and monitoring.
  • Mind everything around the data — logins, jobs, linked servers, settings and connection strings need their own plan.
  • Rehearse and write a runbook — timed rehearsals, clear roles and go or no-go criteria make the real cutover routine.
  • Validate values, not only counts — check data correctness, application behavior and performance against a measured baseline.
  • Secure and clean up — protect data in transit and in staging, keep a fallback for a defined period, then remove temporary access and retire the old system.