Azure Database Migration Service: The Complete Guide

Azure Database Migration Service: The Complete Guide

A friendly, in-depth tour of Microsoft's managed service for moving databases to Azure. Learn how migrations are planned, assessed, run, and verified, the difference between offline and online moves, and how to avoid the mistakes that turn a weekend project into a disaster.

Imagine a family that has lived in the same house for thirty years. Every cupboard is full, the attic holds forgotten treasures, and everybody knows exactly where the spare keys are hidden. Now the family must move to a new house across the city. They cannot simply carry the house. They must decide what to take and what to throw away, pack fragile things carefully, hire a moving company, label every box, make sure the new house has the right sockets and doors, and finally check that nothing was lost or broken. If the move is rushed, the grandmother’s china arrives in pieces and nobody can find the kettle on the first night.

Moving a database to the cloud is the same kind of journey. A database holds the memory of a business: customers, orders, payments, and history. It cannot be lost, damaged, or unavailable for long. Azure Database Migration Service is part of the professional moving company that helps with this journey. In this guide you will learn what it is, what it can and cannot do, how a migration is planned and executed, how offline and online moves differ, how connections and security are arranged, how to check that everything arrived safely, and how to avoid typical mistakes. Every new word is explained when it first appears, and every big idea comes with an everyday comparison.

Managed
Microsoft runs the migration engine for you
Offline or online
Choose a short outage or near-zero downtime
Many sources
Moves several database types into Azure targets

1What Is Azure Database Migration Service?

A managed Azure service that helps you move databases from where they live today into Azure database services, with limited downtime and clear progress tracking.

Starting with the word “database”

A database is an organized store of information that applications read and change. A shop’s website uses a database to remember products, customers, and orders. A database engine is the software that manages it, for example SQL Server, MySQL, PostgreSQL, Oracle, or MongoDB. Each engine has its own rules, features, and file formats, a bit like different brands of filing cabinet.

What is a migration?

A migration is the planned move of something from one place to another. A database migration moves the data, the structure of that data (tables, columns, relationships), and often the logic inside the database (stored procedures, jobs, users) from a source to a target. The source might be a server in your own office, a data center, or another cloud. The target is an Azure database service.

What the service does

Azure Database Migration Service, often shortened to DMS, is a managed Microsoft service that performs the heavy lifting of copying databases into Azure. “Managed” means Microsoft operates the underlying machinery, and you configure and monitor the migration instead of building your own copy tools. It is designed to:

  • Connect to a source database and a target Azure database.
  • Copy the data in an orderly, trackable way.
  • Support moves that need a planned outage (offline) and moves that keep the old database running while changes are continuously copied (online).
  • Report progress, errors, and completion so you can decide when to switch over.
!
Product experience has changed over time

Microsoft has reshaped how database migration is offered in Azure. Older “classic” service pages, newer guided experiences in the Azure portal and in Azure Data Studio, and dedicated features for particular targets all exist or have existed. Supported sources, targets, and features differ by path and change often. This guide teaches the lasting ideas and the typical flow, and you should confirm the exact current options in Microsoft’s documentation before you plan a real project.

Everyday analogy

DMS is the moving company, not the architect or the interior designer. It carries and delivers your belongings and tells you when each box has arrived. Deciding whether you need a bigger house, assessing which furniture will not fit through the new doors, and fixing incompatible plumbing are separate jobs handled by assessment and conversion tools that work alongside it.

Move

Data transfer

Copies the actual rows from source to target in a managed, monitored way.

Sync

Continuous changes

In online mode, keeps the target up to date with new changes until you are ready to switch.

Track

Progress and status

Shows what has been copied, what is lagging, and what has failed.

Cut over

Controlled switch

Lets you decide the exact moment applications start using the new database.

2Why Database Migration Is Hard

Understanding the difficulties explains why a dedicated service exists.

The data is alive

Moving files is easy when nobody is using them. A live database is different: customers place orders every second. If you copy it at noon and switch at midnight, you miss everything that happened in between. The core challenge is moving something that keeps changing while you move it.

Size and time

A small database copies in minutes. A database of several terabytes may need many hours or days, even on a fast connection. The longer a copy takes, the more changes pile up behind it.

Differences between engines

If the source and target are the same kind of engine, such as one SQL Server to another SQL Server, the move is called a homogeneous migration. It is usually simpler. If they are different, such as Oracle to PostgreSQL, it is a heterogeneous migration. Data types, functions, stored code, and behavior can differ, so the structure and code must be converted and tested, not only copied.

The hidden connections

Databases rarely stand alone. Applications connect to them with connection strings. Reports read from them. Scheduled jobs run inside them. Other databases link to them. Forgetting one of these connections causes the classic Monday morning surprise: “The new database is perfect, but the finance report cannot find it.”

The pressure of downtime

Businesses want to move without stopping. Every minute of outage may mean lost sales or unhappy users. This pushes teams toward online migration, which is more complex but keeps the interruption short.

ChallengeWhat goes wrongHow migration planning helps
Live changesData copied earlier becomes staleOnline sync of ongoing changes
Large sizeCopy takes too longParallel transfer, network planning, initial seed then sync
Engine differencesCode breaks on the new engineAssessment and schema conversion before data movement
Hidden dependenciesApplications and jobs fail after cutoverInventory and testing
Business pressureRushed decisionsClear plan, rehearsal, and rollback option
Everyday analogy

Moving a database is like moving a restaurant while it is open. The kitchen keeps cooking orders while the movers carry out the stoves. You need a plan that keeps serving customers, or at least a plan that closes for the shortest possible time.

3Offline and Online Migration

The biggest decision in any migration is how much downtime the business can accept.

Offline migration

In an offline migration, the source database stops accepting changes at a chosen time. The data is copied to the target. When the copy is verified, applications are pointed to the new database. Downtime lasts from the moment you stop the source until applications run on the target, which can range from minutes to many hours depending on size.

  • Good for: smaller databases, systems with a natural quiet window such as a weekend, and teams that want simplicity.
  • Trade-off: the application is unavailable during the copy.

Online migration

In an online migration, the source database keeps running. The service first copies the existing data (the initial load), and then continuously captures new changes from the source and applies them to the target (change synchronization, sometimes called continuous sync or replication). When the target has nearly caught up, you schedule a short cutover: stop writes at the source, let the final changes drain, and switch applications.

  • Good for: large or busy systems that cannot afford a long outage.
  • Trade-off: more setup, stricter source requirements (often logging must be configured so changes can be read), more things to monitor.
flowchart TD
    subgraph OFF["Offline migration"]
      O1["Stop writes on source"] --> O2["Copy all data"]
      O2 --> O3["Validate target"]
      O3 --> O4["Point applications to target"]
    end
    subgraph ON["Online migration"]
      N1["Source keeps running"] --> N2["Initial load of existing data"]
      N2 --> N3["Continuous sync of new changes"]
      N3 --> N4["Short cutover window"]
      N4 --> N5["Point applications to target"]
    end
    
FIG 3.1 — Offline and online migration compared by flow

Offline: strengths

  • Simpler to plan and run
  • Fewer moving parts
  • Easy to verify one consistent snapshot
  • Lower risk of sync problems

Offline: weaknesses

  • Downtime grows with database size
  • Not suitable for around-the-clock systems
  • Pressure if the window overruns

Online: strengths

  • Very short downtime at cutover
  • Time to test the target before switching
  • Switch when you are ready, not when the copy ends

Online: weaknesses

  • More configuration and prerequisites
  • Change capture adds load on the source
  • Requires careful monitoring of lag
Everyday analogy

Offline migration is closing the shop on Sunday, moving everything, and reopening in the new place on Monday. Online migration is quietly filling the new shop with copies of the stock while the old one keeps trading, then moving only the last few items and the cash register on a quiet evening.

i
Ask the business first

The right mode is a business answer before it is a technical one. Ask: how long can the system be unavailable, what does an hour of downtime cost, and when are the quiet hours? Those answers choose the approach.

4Sources, Targets, and the Tool Family

DMS is one tool in a toolbox. Knowing the others tells you where it fits.

Typical sources

Commonly discussed sources include SQL Server, MySQL, PostgreSQL, MongoDB, and Oracle, running on-premises, on virtual machines, or in other clouds. The exact list of supported source versions and combinations depends on the migration path, so always check current documentation.

Typical Azure targets

TargetWhat it isThink of it as
Azure SQL DatabaseFully managed database for SQL Server workloads, one database at a time or in poolsA hotel room: everything maintained, but you only control what is inside the room
Azure SQL Managed InstanceManaged service with very high SQL Server compatibilityA serviced apartment: managed building, near-familiar layout
SQL Server on Azure virtual machinesYour own SQL Server on a rented machineRenting an empty house: full control, you do the upkeep
Azure Database for MySQLManaged MySQL serviceA managed room for MySQL users
Azure Database for PostgreSQLManaged PostgreSQL serviceA managed room for PostgreSQL users
Azure Cosmos DBGlobally distributed multi-model databaseA chain of branches worldwide

The helpers around DMS

Discover

Azure Migrate

A central hub to discover servers and databases, estimate readiness and cost, and track migration projects.

Assess

Assessment tools

Tools such as the SQL assessment in Azure Data Studio and the Azure portal check compatibility and recommend a target size.

Convert

SQL Server Migration Assistant family

Converts schema and code from other engines such as Oracle or MySQL into SQL Server and Azure SQL formats.

Move

Database Migration Service

Moves the data and, for online scenarios, keeps it synchronized until cutover.

flowchart LR
    D["Discover estate with Azure Migrate"] --> A["Assess compatibility and sizing"]
    A --> C["Convert schema and code if engines differ"]
    C --> M["Move data with Database Migration Service"]
    M --> V["Validate"]
    V --> X["Cut over and operate"]
    
FIG 4.1 — Where DMS sits inside the full migration journey
!
Tools get retired and renamed

Some older migration utilities have been retired or replaced by newer experiences. When a tutorial names a tool, check that it is still supported and is the recommended choice today.

5Architecture and Components

The moving parts that sit between your old database and your new one.

The core pieces

Service

The migration service resource

An Azure resource that coordinates migrations, holds their configuration, and shows their status.

Project

Migration project or job

A named unit of work: which source, which target, which databases, and which mode.

Connect

Source and target connections

The addresses and credentials the service uses to reach both databases.

Bridge

Runtime or gateway

For on-premises sources, a small helper installed inside your network, often a self-hosted integration runtime, that safely reaches the source and talks to Azure.

Stage

Staging storage

For backup-based moves, an Azure storage account where database backup files are placed and read from.

Observe

Monitoring views

Pages and queries that show per-database state, progress, lag, and errors.

Two broad ways to move SQL Server data

For SQL Server sources, two broad approaches exist. A backup-and-restore approach takes database backup files, places them where Azure can read them, and restores them into the target. For online moves, further backup files holding recent changes are applied continuously until cutover. A logical data copy approach reads the tables and rows from the source and writes them into the target. Backup-based moves are typically fast and keep the database very close to the original. Logical copy approaches are more flexible when the target or engine differs.

flowchart TD
    SRC["Source database on premises or other cloud"] --> RT["Helper runtime inside your network"]
    RT --> DMS["Azure Database Migration Service"]
    SRC -->|"backup files"| ST["Azure storage account"]
    ST --> DMS
    DMS --> TGT["Target Azure database service"]
    DMS --> MON["Status and monitoring in portal"]
    
FIG 5.1 — Components involved in a typical migration

What runs where

  • Inside your network: the source database and the helper runtime that reads from it.
  • In Azure: the migration service, staging storage, and the target database.
  • On the path between: your network link to Azure, such as a VPN or a private line.
Everyday analogy

The helper runtime is like a trusted driver who has a key to the old house. He loads the boxes and drives them over the road to the new house, where the receiving team (the service) unloads them. You do not hand your front door key to people outside the company.

How the pieces cooperate inside a job

When you start a migration, the service first checks that it can reach the source and the target and that the accounts have the needed permissions. These checks are like a pilot’s pre-flight list: they catch easy problems before any data moves. Next, the service builds a plan of what to move, such as which databases, which tables, or which backup files, and in which order. Work is then split into units so several can run at the same time. Each unit reports its own status, so a failure in one table does not hide the success of the others. When all units finish, the service performs final steps, such as confirming that every unit completed, and marks the job ready for cutover or completed.

Because each unit is tracked separately, you can often fix and retry a single failed table without starting over. This is one of the practical reasons to use a managed service instead of a one-off script: progress is recorded, repeatable, and visible to the whole team instead of living in one person’s terminal window.

6Assessment: Know Before You Move

An hour of assessment can save a week of rework.

What an assessment checks

An assessment is an automated review of your source database against the chosen target. It looks for features the target does not support, behavior that changes between versions, and settings that need attention. It then produces a readiness report and often recommends a target size and service tier based on observed usage.

Blockers

Things that stop the move

Features the target cannot run at all. These must be redesigned or the target must change.

Warnings

Things that behave differently

The move works, but results or performance may change. These need testing.

Sizing

Right-sized recommendation

Suggested compute and storage based on measured CPU, memory, and input/output use.

Cost

Estimated monthly cost

A rough picture of what the target will cost to run.

Choosing the right target from the assessment

If the database uses many server-level features, such as cross-database queries, agent jobs, or linked servers, a managed instance or a virtual machine target may fit better than a single database. If it is a self-contained application database, a single database may be simplest and cheapest. Assessment results turn this from a guess into an evidence-based choice.

Collect real performance data

Sizing from a quiet afternoon leads to a target that struggles on payday. Collect performance data across a representative period, including month-end peaks. This is like measuring how much luggage a family has after a holiday season, not after a week when they were away.

1

Inventory

List every database, its size, version, owners, and the applications that use it.

2

Assess

Run compatibility checks for each candidate target.

3

Measure

Collect performance counters during busy and quiet periods.

4

Decide

Pick the target, the mode, and the date with business input.

Everyday analogy

Before moving, you measure the furniture and the doorways of the new house. A sofa that does not fit the front door is cheap to discover on paper and expensive to discover on moving day.

Assessing the people and the process

Assessment is not only about software. Ask who owns each database, who uses it, and who can approve downtime. Find out which teams must change connection settings, which vendors support applications that cannot be changed easily, and whether any application is so old that it only works with an old database driver. Some older applications cannot talk to newer database versions without an update, and this surprise can block an otherwise perfect plan. Add a column to your inventory for “application readiness” and treat it as seriously as database readiness.

Finally, estimate the effort honestly. A typical project spends only a small portion of its time on the actual data transfer. Most of the time is spent on discovery, fixing compatibility issues, networking approvals, testing, and communication. Teams that plan only for the copy are the ones that run out of schedule.

7Schema and Code Migration

Data is only half of a database. The structure and logic must arrive intact too.

What is the schema?

The schema is the blueprint of a database: its tables, columns and their types, keys that identify rows, relationships between tables, indexes that speed up searches, and rules that keep data valid. If you move data without the blueprint, there is nowhere to put it.

Beyond tables: the logic inside

Many databases contain code. Stored procedures are named programs saved in the database. Triggers run automatically when data changes. Views are saved queries that look like tables. Functions compute values. Jobs run on a schedule. Users and permissions control who can do what. For same-engine moves, most of this travels with the database. For different-engine moves, it must be converted line by line, tested, and sometimes rewritten.

Schema first, data second

A reliable pattern, especially for logical copies, is to deploy the schema to the target first, review and adjust it, and only then load data. Some tools migrate the schema as a separate step so you can check it before a single row moves. This also allows you to create indexes and constraints at the best moment: loading data into tables with fewer indexes is faster, and indexes can be added afterward.

ItemSame-engine moveDifferent-engine move
Tables and data typesUsually carried over directlyTypes mapped and sometimes changed
Stored codeUsually works, check version differencesConverted and tested thoroughly
Scheduled jobsMay need recreating on managed targetsRecreated using the target’s scheduler
Logins and permissionsOften need migrating separatelyRedesigned for the new engine
Performance tuningRe-test plans and statisticsRe-tune indexes and queries
!
Logins and jobs are often forgotten

Data and tables get all the attention, but database logins, server-level jobs, and linked server connections live outside the database in some products. Make a checklist of these items early so they do not become a surprise after cutover.

Everyday analogy

Moving the contents without moving the wiring and plumbing leaves you with a house full of furniture and no lights. Schema and code are the wiring: invisible when they work and unmistakable when they do not.

8Data Flow: An Offline Migration, Step by Step

Follow a simple offline move from the first meeting to the final switch.

sequenceDiagram
    participant B as Business owner
    participant T as Migration team
    participant S as Source database
    participant M as Migration service
    participant G as Target database
    participant A as Applications
    B->>T: Approve maintenance window
    T->>S: Final backup and stop writes
    T->>M: Start migration job
    M->>S: Read data
    M->>G: Write data
    M-->>T: Progress and completion status
    T->>G: Validate counts and sample data
    T->>A: Update connection settings
    A->>G: Normal operation resumes
    T-->>B: Report success
    
FIG 8.1 — Offline migration from approval to resumed operation

Before the window

  • Prepare the target: create the target database service, size it, set networking, and deploy the schema.
  • Prepare connectivity: make sure the service can reach both source and target, and test using a small trial database.
  • Rehearse: run the complete migration on a copy, time each step, and write down what you learned.
  • Communicate: tell users when the outage will occur and how long it should last.

During the window

1

Quiesce the source

Stop the applications from writing, or put the database into a read-only state, so the copy is consistent.

2

Start and monitor the job

Watch the progress of each table or backup, and note any errors.

3

Validate

Compare row counts, key totals, and sample records between source and target.

4

Finish setup

Recreate indexes, constraints, users, and jobs not carried automatically, and refresh statistics.

5

Switch applications

Update connection settings, restart services, and run a short smoke test.

6

Decide: go or roll back

If tests pass, announce success. If not, follow the rollback plan while the old database is still intact.

After the window

Keep the source database untouched but offline for an agreed period, such as days or weeks, as insurance. Watch performance closely for the first few busy days. Only after the business confirms everything is correct should the old system be retired.

Everyday analogy

A good moving day has a checklist: lock up, load the truck, unload, check the inventory list, plug in the fridge. And the old keys are kept for a few days in case you forgot a box.

9Data Flow: An Online Migration and the Cutover

How a near-zero-downtime move works, and why the cutover is the most delicate moment.

sequenceDiagram
    participant A as Applications
    participant S as Source database
    participant M as Migration service
    participant G as Target database
    participant T as Migration team
    M->>S: Read existing data
    M->>G: Initial load
    A->>S: Normal reads and writes continue
    M->>S: Capture new changes
    M->>G: Apply changes continuously
    M-->>T: Lag is near zero
    T->>A: Pause writes at cutover time
    M->>G: Apply last pending changes
    T->>G: Final validation
    T->>A: Switch to target
    A->>G: New reads and writes
    
FIG 9.1 — Online migration: initial load, ongoing sync, and cutover

Phase one: initial load

The service copies the existing data while the application continues to run. This phase may take a long time for large databases. During it, the source records every change that happens, so nothing is lost.

Phase two: catching up and staying in sync

Once the initial load completes, the service applies the backlog of changes that accumulated during the copy. Then it keeps applying new changes as they arrive. The delay between a change at the source and its arrival at the target is called lag. A healthy migration shows small, steady lag.

Phase three: testing without hurry

Because the source still serves production, you can take your time to test the target. Run read-only queries, compare results, test reports, and check performance, as long as you do not write to the target in ways that conflict with the sync. This is the great advantage of online migration: confidence before the switch.

Phase four: cutover

Cutover is the switch from old to new. A careful cutover has these steps.

  1. Announce the brief interruption.
  2. Stop writes to the source by pausing applications or setting the database to read-only.
  3. Wait for lag to reach zero, so every last change has arrived at the target.
  4. Complete the migration in the service, which stops synchronization and makes the target the standalone copy.
  5. Validate quickly with a prepared set of checks.
  6. Redirect applications to the target.
  7. Monitor the first minutes and hours closely.
!
One-way street

After cutover, new data is written to the target and the old source no longer receives it. Rolling back means either accepting the loss of new data or setting up a reverse copy. Decide your rollback strategy before cutover, not after problems appear.

i
Source requirements

Online sync usually requires special settings at the source, such as particular logging levels, recovery models, or permissions so changes can be read. These requirements vary by engine and path, so verify them in the prerequisites well ahead of the migration weekend.

Everyday analogy

It is like a relay race baton pass. Both runners run side by side at the same speed for a while (sync). At the exact moment the baton is handed over (cutover), only one runner continues. A good pass needs both runners at the same pace and no fumbling.

What can go wrong during synchronization

Several things can disturb a synchronized migration, and knowing them in advance makes them easier to handle. If the source runs a large batch job, such as a nightly import of millions of rows, the stream of changes suddenly becomes much bigger and lag grows. If the target is too small, it cannot apply changes as fast as they arrive. If the network link is shared with other traffic, the flow slows at busy times. If someone changes the structure of a table at the source while synchronization is running, for example by adding a column, the target may not know how to apply new changes until the structure is aligned. Many teams therefore declare a change freeze during the migration period: no structure changes, no big one-off batch jobs, and no unplanned maintenance on the source.

Another subtle point is the handling of tables without a reliable unique identifier. Change synchronization works best when each row can be identified uniquely, usually by a primary key. Tables without one can be hard to synchronize correctly, because the service cannot tell exactly which row a change refers to. Review such tables during assessment and add keys or handle them separately.

10Networking and Connectivity

The road between old and new must exist, be wide enough, and be safe.

The three connections

  • From the migration helper or service to the source.
  • From the migration service to the target.
  • From your network to Azure, over which the data travels.

Network options

OptionWhat it isWhen it fits
Internet with encryptionNormal internet links, with encrypted trafficSmall databases, quick tests
Site-to-site VPNAn encrypted tunnel between your network and an Azure virtual networkMedium databases, moderate time pressure
ExpressRouteA private dedicated line to AzureLarge databases, steady high throughput, strict privacy rules
Offline shipping of dataPhysical devices or very large backup transfersVery large data sets where bandwidth is the limit

Doing the arithmetic

Before choosing, calculate how long the initial copy will take. A rough rule: divide the data size by the realistic sustained bandwidth, not the advertised one. A database of several terabytes on a modest link may need days. Add overhead for compression, retries, and sharing the link with other users. If the number is too large, you need a faster link, a seeding approach using backup files, or a phased plan.

Firewalls and private access

Both the source and the target usually sit behind firewalls. You must allow the migration service or helper to pass. Many organizations require that traffic never crosses the public internet, so the target is placed on a private network with private endpoints, which give an Azure service a private address inside your virtual network. Migration then runs through that private path. Plan name resolution (DNS) carefully, because a private endpoint needs the right name to point to the private address.

flowchart LR
    ONP["On-premises network: source and helper"] -->|"VPN or ExpressRoute"| VNET["Azure virtual network"]
    VNET --> PE["Private endpoint for target"]
    PE --> TG["Target database"]
    VNET --> SA["Staging storage via private access"]
    FW["Firewalls on both sides"] -.-> ONP
    FW -.-> VNET
    
FIG 10.1 — A private migration path between a data center and Azure
i
Test the road early

Most migration delays are not caused by the migration tool. They are caused by blocked ports, missing firewall rules, or name resolution problems found on the night of the move. Run a connectivity test with a small database weeks earlier.

Everyday analogy

You can carry boxes along a footpath, but a piano needs a wide road and a ramp. The size of your cargo decides how much road you must build.

11Security During Migration

A migration moves your most valuable information. Treat the whole journey as a secured transport.

Protect data in transit

Data traveling between source, service, and target should be encrypted using standard secure connection protocols. Where possible, avoid the public internet and use private connections. Check that older, weaker protocol versions are disabled on both ends.

Protect data at rest

Backup files placed in staging storage are as sensitive as the database itself. Use a dedicated storage account, restrict who can read it, use encryption at rest (provided by default for Azure storage), and delete the backup files when the migration is finished and verified.

Protect credentials

  • Use accounts created only for the migration, with the minimum permissions required.
  • Store passwords and keys in a secret store such as Azure Key Vault, not in documents or chat.
  • Prefer identity-based access (managed identities or integrated sign-in) where supported.
  • Disable or delete migration accounts when finished.

Protect access to the migration itself

Anyone who can change a migration job can read or alter data in flight. Use Azure role-based access control to limit who can create or manage migration resources, require multi-factor sign-in, and log all actions.

Sensitive data and compliance

Know what personal or regulated data the database holds and where it is allowed to go. Choose target regions that satisfy residency rules. Where policy requires it, mask or exclude sensitive fields in non-production copies used for rehearsal. Keep an audit record of who migrated what and when.

Secure habits

  • Dedicated, least-privilege migration accounts
  • Private network paths
  • Secrets in a vault
  • Backup files deleted after use
  • Audit logs reviewed

Risky habits

  • Using an all-powerful admin login
  • Leaving backups in a public container
  • Pasting passwords into tickets
  • Leaving migration accounts active for months
  • Copying production data into open test systems
Everyday analogy

Moving house with a safe full of jewelry means hiring a trusted carrier, tracking the van, and never leaving the truck unattended with the door open. The moving day is the time of greatest exposure, so treat it with extra care.

12Performance, Sizing, and Speed

What makes a migration fast or slow, and how to size the target for loading and for life afterward.

What limits speed

Network

Bandwidth and latency

The slowest link in the road sets the pace. Latency matters for many small operations.

Source

Read speed and load

A busy source slows both the application and the copy. Reading large tables competes with real users.

Target

Write capacity

The target must absorb rows quickly. Under-sized targets throttle the load.

Data shape

Large objects and many indexes

Very large text or binary columns and heavily indexed tables slow loading.

Scale up for the move, scale down after

A common technique is to temporarily choose a larger target size during the migration so writes run quickly, and then reduce to the right-sized level once the move and tuning are finished. Many Azure database services allow changing the size without rebuilding, though a brief reconnection may occur. Check your target’s rules and any limits on how often you can change.

Make loading efficient

  • Load large tables in parallel where the tool allows it.
  • Defer building non-essential indexes until after the data is loaded.
  • Run heavy reads against a secondary or backup copy of the source, if available, to protect production.
  • Avoid running other large jobs, like backups or index rebuilds, at the same time.
  • Migrate in waves: small and simple databases first to learn, large and critical ones later.

After the move: performance may differ

Even when everything is correct, performance can feel different on the new platform. The hardware, storage speed, query optimizer version, and compatibility settings may differ. Plan a post-migration tuning stage: update statistics, review slow queries, compare against baseline timings, and adjust indexes or sizing. A baseline taken before the move makes this much easier.

Before migrationDuring migrationAfter migration
Capture baseline timings of key queries and reportsTemporarily raise target size if helpful, watch lag and throughputCompare to baseline, update statistics, right-size, tune
Everyday analogy

Hiring a bigger truck for moving day makes sense, but you do not keep paying for it forever. Likewise, a spacious new home still takes a few weeks of rearranging before everything feels convenient.

13Validation and Testing

A migration is only finished when you can prove that the new database is correct.

Levels of checking

1

Structure checks

All tables, views, procedures, indexes, and constraints exist as expected.

2

Volume checks

Row counts match for every table, and totals of important numeric columns agree.

3

Content checks

Sampled rows, and checksums or hash comparisons for key tables, are identical.

4

Functional checks

The application works: log in, search, place an order, run month-end reports.

5

Performance checks

Key operations run as fast as, or faster than, the baseline.

6

Operational checks

Backups, monitoring, alerts, security settings, and scheduled jobs are working.

Subtle differences to look for

  • Character sets and sorting rules: may change how text compares or sorts.
  • Date and time handling: time zone defaults and precision can differ.
  • Number precision: rounding of decimals may vary between engines.
  • Case sensitivity: some engines treat “Smith” and “smith” as different.
  • Identity values: automatically increasing numbers must continue from the right place.

Dress rehearsal

Practice the whole migration, including cutover and rollback, at least once on realistic data. Time every step. The rehearsal result is your best estimate of the real outage, and the issues it reveals are the cheapest you will ever fix.

!
“Zero errors” is not proof

A migration job that reports success only proves that the tool finished without errors it noticed. It does not prove that business meaning survived. Always add your own checks that the business cares about, such as account balances or order totals.

Everyday analogy

After the move, you do not trust the moving company’s “all delivered” note. You walk through each room with the inventory list, test the lights, and run the taps.

14Monitoring and Troubleshooting

What to watch while a migration runs, and how to react when something goes wrong.

What to watch

State

Per-database status

Is each database waiting, loading, syncing, ready for cutover, completed, or failed?

Lag

Sync delay

How far behind the target is. Rising lag means the target or network cannot keep up.

Throughput

Rows or data per second

Used to estimate remaining time and to detect slowdowns.

Resources

Source and target load

CPU, memory, storage, and log space on both sides, since exhaustion causes failures.

Common problems and likely causes

SymptomLikely causeWhat to try
Cannot connect to the sourceFirewall, wrong address, wrong credentials, or the helper runtime is offlineTest the connection from the helper machine and check rules and credentials
Cannot connect to the targetTarget firewall blocks the service, private endpoint and name resolution problemsCheck network rules and DNS resolution of the target name
Backup restore failsMissing backup in the chain, wrong file order, or unsupported backup optionsCheck the backup chain and file permissions in the storage account
Sync lag keeps growingTarget too small, heavy source writes, or network limitsScale the target up, reduce competing jobs, check bandwidth
Source log or storage fills upChanges are retained until captured but the migration is paused or slowResume or fix the migration, free space, or extend storage
Schema errorsUnsupported feature or data typeRevisit the assessment and adjust the object definitions
Data mismatch after loadType conversion, encoding, or constraint rules differCompare sample rows and correct mapping, then reload affected tables

A calm method for troubleshooting

  1. Read the exact error message and the object it names.
  2. Check the simple things: credentials, network, disk space, permissions.
  3. Look at the logs for the migration job and for both databases.
  4. Reproduce the issue on a small test, if possible.
  5. Change one thing at a time and record what you changed.
  6. If stuck, gather the details, such as job identifiers, timestamps, and versions, and open a support request.
Everyday analogy

If a moving van does not arrive, you check the address, the road, and the phone number before you suspect that the company has gone bankrupt. Most failures have simple, boring causes.

Setting up alerts and a shared status view

A migration that runs overnight should not depend on someone staring at a screen. Set alerts for failed jobs, for lag above an agreed number, and for low disk space on the source and target. Send them to a channel that the whole migration team can see. Keep a simple shared status page or document that lists every database, its current state, its owner, and its next step. During a large program this single page becomes the heartbeat of the project, answering the question “where are we?” without a meeting.

Also decide in advance who has the authority to pause, resume, or abandon a migration. In stressful moments, unclear authority wastes precious minutes. A short list of names, phone numbers, and decision rights in the runbook solves this.

15Cost, Licensing, and Automation

What a migration costs, how to keep it under control, and how to repeat it reliably for many databases.

Where the money goes

Cost itemNotes
Migration service usageDepending on the path, the service may be free for certain scenarios or charged by tier and time. Check current pricing for your exact path.
Target databaseOften the largest cost. Begins when you create it, so avoid creating it long before you need it.
Staging storageSmall cost for holding backup files temporarily.
NetworkDedicated lines and virtual private network gateways have their own charges.
People and timePlanning, testing, and application changes usually exceed tool costs.
Parallel runningPaying for both old and new systems for a period.

Licensing considerations

Moving database software licenses can offer savings. Microsoft has offered programs that let eligible customers use existing licenses on Azure targets at reduced rates, and rules on older products have included special support arrangements. These offers have conditions and change, so ask your licensing specialist and read current terms rather than assuming.

Automating repeated migrations

If you must move dozens or hundreds of databases, doing each by hand invites inconsistency. Use automation: command-line tools, scripts, templates, and pipelines can create targets, start migrations, check status, and run validation the same way every time. Keep migration plans and settings in version-controlled files, and give each wave a runbook with clear steps and responsible people.

flowchart TD
    INV["Inventory and assessment results"] --> WAVE["Group databases into waves"]
    WAVE --> TPL["Deploy targets from templates"]
    TPL --> RUN["Start migrations by script"]
    RUN --> MON["Monitor status centrally"]
    MON --> VAL["Run automated validation"]
    VAL --> CUT["Scheduled cutover by runbook"]
    CUT --> RET["Retire source after hold period"]
    
FIG 15.1 — A repeatable pipeline for many database moves
i
Keep prices out of your design

Prices, free tiers, and discount programs change. Use them for the business case, but verify them on the day you decide, and base architecture choices on technical need.

Everyday analogy

If a company moves one hundred offices, it uses the same checklist, the same labels, and the same crew style for each, adjusting only for differences. The tenth move is smoother than the first because the process has been refined.

16Design Patterns and Anti-Patterns

Strategies that experienced teams reuse, and traps that cause trouble.

Pattern: pilot, then waves

Start with a low-risk database to learn the tools, network, and process. Then move databases in waves, ordered by risk and dependency. Each wave improves the next.

Pattern: seed with backups, finish with sync

For large databases, seed the target from a full backup, which is usually faster than reading rows, and then apply log or change backups until the target is nearly current. The final cutover then only has to apply a small last portion.

Pattern: migrate applications and databases together

Databases and the applications that use them should be considered as one unit. If an application stays far away from its new database, latency can make it painfully slow. Move them close together, or confirm that the latency is acceptable.

Pattern: parallel run for critical systems

For the most critical systems, keep both old and new running for a short period with comparison checks before the old one is retired.

Good habits

  • Assess before choosing the target
  • Rehearse the full migration and rollback
  • Capture baselines
  • Keep the source safe for a hold period
  • Document every step

Anti-patterns

  • “Lift and hope” with no testing
  • Migrating everything on one weekend
  • Skipping application testing
  • Deleting the source immediately
  • Letting only one person know the plan
ADR-01Accepted
Decision: use online migration with backup seeding for the order database

Context: The order database is large and used around the clock. The business accepts at most a few minutes of interruption.

Decision: Seed the target from a full backup, apply ongoing change backups, rehearse twice, and cut over during the lowest-traffic hour.

Consequences: Higher setup effort and stricter source configuration, but the outage drops from hours to minutes. The team accepts the extra preparation and monitoring work.

A migration is not a technical event with a business side effect. It is a business event with a technical method.

17Best Practices and Common Mistakes

A checklist to follow, and a list of stumbles to skip.

Best practices

1

Start with the business goal

Know why you are moving: cost, scale, support ending, or modernization. The goal shapes every choice.

2

Inventory and assess everything

Include all dependent applications, jobs, reports, and connections.

3

Choose the target on evidence

Use assessment and performance data, not habit or guesses.

4

Prepare the network and security early

Firewalls, private access, accounts, and secrets take time to approve.

5

Rehearse and time everything

Include validation and rollback. Use the timings to set the real window.

6

Write a runbook

List steps, owners, checkpoints, go or no-go criteria, and contact numbers.

7

Validate with business checks

Have the business owners confirm key numbers and workflows.

8

Hold, tune, then retire

Keep the source safe for a defined period, tune the target, and decommission only after sign-off.

Common mistakes

MistakeWhat happensBetter approach
Skipping assessmentUnsupported features discovered during cutoverAssess early and fix blockers first
Ignoring logins, jobs, and linked connectionsApplication or reports fail after the switchList non-data objects and migrate or recreate them
Under-sized targetSlow loads and poor performanceSize from measured peaks and tune afterward
No rollback planPanic when something failsDefine rollback triggers and steps in advance
Weak network testingBlocked connections on migration nightTest with a small database weeks earlier
Testing only the databaseApplications break on small behavior differencesRun full application test cycles
Decommissioning too soonNo way back when late problems appearKeep the source for an agreed hold period
Following outdated tutorialsUsing retired tools or wrong stepsCheck current documentation for your exact path
!
The most dangerous sentence

“It worked in the small test.” Small tests prove connectivity and basic logic, not scale, timing, or real-world data oddities. Always rehearse with realistic volumes and data.

18Real-World Scenarios

These are composite examples that show typical situations. They are illustrations, not reports about specific companies.

Scenario 1: A small business accounting system

Situation: An accounting firm runs a modest SQL Server database on an aging office server whose support is ending. The firm is quiet on weekends.

Approach: Assessment shows the database fits a single managed database target. The team chooses an offline migration on a Saturday night, rehearses once, and switches the application on Sunday morning.

Result: A few hours of outage, no data loss, and no hardware to maintain.

Scenario 2: An online store that never sleeps

Situation: A retailer’s order database is large and busy at all hours. Even an hour of downtime would cost sales.

Approach: The team seeds the target from a full backup, keeps it synchronized, tests reports on the target for two weeks, and cuts over at the quietest hour with a prepared checklist.

Result: Interruption measured in minutes, and a smooth switch because everything had been tested in advance.

Scenario 3: A heavily customized legacy system

Situation: A manufacturing company has a database with agent jobs, linked servers, and cross-database queries that would not work on a single-database target.

Approach: Assessment points to a managed instance target. The team migrates the databases together, recreates logins, and tests every job.

Result: Almost no code changes were needed, and the system gained built-in backups and patching.

Scenario 4: Moving between database engines

Situation: A company wants to move from a commercial database engine to an open-source managed service to reduce licensing costs.

Approach: A conversion tool translates the schema and stored code, developers fix what could not be converted automatically, and the data is moved in a rehearsed sequence with extensive application testing.

Result: Longer project than a same-engine move, but lasting savings and a modern platform.

Scenario 5: Hundreds of small databases

Situation: A software vendor hosts a separate database per customer and must move hundreds of them.

Approach: The team automates assessment, creates targets from templates, migrates in waves of twenty, and runs the same validation script on each.

Result: A predictable pace, a central dashboard of progress, and quick detection of the few odd databases that needed special handling.

19Comparing Migration Approaches

DMS is one of several ways to move a database. Choose by size, downtime, and difference between engines.

ApproachBest forWatch out for
Azure Database Migration ServiceManaged, trackable moves with offline or online optionsCheck supported paths and prerequisites
Native backup and restoreSame-engine moves where a short outage is acceptableManual steps and larger downtime for big databases
Native replication or log shippingTeams that know the engine’s own toolsMore hands-on configuration
Export and import utilitiesSmall databases and simple structuresSlow for big data, easy to miss objects
Target-specific features, such as links or log replay for managed instancesParticular SQL Server to managed instance scenariosSpecific requirements per feature
Third-party replication toolsUnusual combinations or special needsLicense cost and extra skills
Rebuild the applicationWhen the old design no longer fits at allLarge project, not a pure migration
flowchart TD
    Q["Start with your constraints"] --> A{"Can you accept a long outage"}
    A -->|"yes"| OFF["Offline migration or native backup and restore"]
    A -->|"no"| B{"Same database engine on both sides"}
    B -->|"yes"| ON1["Online migration with seeding and sync"]
    B -->|"no"| C["Convert schema, then move data with testing"]
    C --> ON2["Consider online sync after conversion is stable"]
    
FIG 19.1 — A simple way to narrow the choice of approach
i
Check the current guidance

Microsoft publishes recommended migration paths for each source and target pair, and these recommendations change. Start from the official migration guides for your pair and confirm prerequisites and limits before committing to a plan.

20Frequently Asked Questions

Q1What is Azure Database Migration Service in one sentence?

It is a managed Azure service that helps you move databases from other locations into Azure database services, with offline and online options and progress tracking.

Q2Does it move the schema and code too?

It depends on the path. Some paths migrate schema as well as data. Others expect you to deploy or convert the schema with separate tools first. Always check what your chosen path covers.

Q3What is the difference between offline and online migration?

Offline stops the source during the copy, so downtime is longer. Online keeps the source running, syncs changes, and needs only a short interruption at cutover.

Q4Can I migrate between different database engines?

Yes in many cases, but you first need to convert the schema and code, and you must test carefully because behavior can differ.

Q5How long will my migration take?

It depends on the data size, network speed, source load, and target size. Rehearse with realistic data and use the measured time as your estimate.

Q6Is it free?

Pricing depends on the migration path and tier, and some scenarios have been offered without service charges. You still pay for the target database, storage, and network. Check current pricing.

Q7What is cutover?

It is the moment when applications stop using the old database and start using the new one, after the final changes have been copied.

Q8Can I go back after cutover?

Only with planning. Once the new database accepts writes, the old one is out of date. A rollback needs either acceptance of lost new data or a reverse copy prepared in advance.

Q9Do I need a special helper installed in my network?

For many on-premises sources, yes: a small runtime or gateway that can reach the source and communicate with Azure. The details depend on the migration path.

Q10How do I know the data arrived correctly?

Compare structures, row counts, totals, and sampled content, and run business tests. The tool’s success message is not enough on its own.

Q11Which Azure target should I choose?

Use the assessment. Single databases suit self-contained applications, managed instances suit servers with many features and cross-database needs, and virtual machines suit cases needing full control.

Q12Is the data safe during migration?

It can be, if you use encrypted connections, private paths where possible, least-privilege accounts, protected staging storage, and deletion of temporary files afterward.

Q13Why is my new database slower than the old one?

Possible reasons include undersizing, outdated statistics, different compatibility settings, missing indexes, or network distance between the application and the database. Compare with your baseline and tune.

Q14When can I delete the old database?

After the business has signed off, the target has run through a full business cycle such as a month-end, backups are confirmed, and the agreed hold period has passed.

Q15Where should a beginner start?

Pick one small, non-critical database. Assess it, choose a target, rehearse an offline migration, validate, and write down what you learned. Then scale up.

21Summary and Key Takeaways

A good migration is quiet: planned, rehearsed, and uneventful.

We started with a family moving house, and the picture holds true all the way through. You decide why you are moving, measure the new home, pack carefully, choose between closing for a day or moving while still living there, check every box on arrival, and keep the old keys for a while. Azure Database Migration Service is the managed moving crew that carries your data and keeps you informed. Assessment tells you what will fit, conversion tools adapt what will not, and your own testing proves that the result is right.

The deeper lesson is that technology is only part of the work. The biggest wins come from clear business goals, early assessment, tested networks, realistic rehearsals, honest validation, and calm cutovers. The tool helps with the transfer, but people make the plan.

Key Takeaways

  • Azure Database Migration Service is a managed service for moving databases to Azure targets, working best alongside assessment and conversion tools.
  • Choose offline migration for simplicity when a window exists, and online migration with continuous sync when downtime must be minimal.
  • Assess first: compatibility, sizing, and target choice should come from evidence, not guesses.
  • Migrate more than data: schema, code, logins, jobs, and application connections all need a plan.
  • Test networks, security, and the full process through rehearsal, including cutover and rollback.
  • Validate with structural, volume, content, functional, and performance checks, plus business sign-off, and keep the source for a hold period.
  • Product paths, features, and prices change, so confirm the current options for your exact source and target in Microsoft’s documentation.