Microsoft AzureDatabaseSQLIntermediate22 min read

What Is Azure Database Migration in Databases?

Also known as: Azure Database Migration, DP-300 migration, Azure Data Migration Service, database migration Azure, Azure SQL migration

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

Azure Database Migration means transferring your database, like SQL Server or MySQL, from your own computer or another cloud to Azure’s cloud. Azure provides tools to make this move smooth, fast, and safe. It helps you avoid breaking your applications while the data moves. Think of it as packing your digital files into a moving truck and shipping them to a new, more powerful data center.

Must Know for Exams

The term “Azure Database Migration” is a significant topic in the DP-300 exam (Administering Relational Databases on Microsoft Azure), which is one of the core exams for the Azure Database Administrator Associate certification. This exam includes a substantial section on “Plan and Implement a Data Platform”, which covers migration strategies, tools, and procedures. Candidates must understand the differences between offline and online migrations, when to use each, and how to use Azure Database Migration Service (DMS) along with the Data Migration Assistant (DMA). Exam objectives specifically ask about assessing source environments, performing pre-migration evaluations, and executing migrations with minimal downtime. Questions may present a scenario where a company needs to migrate a 2 TB SQL Server database to Azure SQL Managed Instance with only four hours of downtime, and the candidate must choose the correct tool and approach.

Additionally, other Azure-related exams like AZ-900 (Azure Fundamentals) and DP-900 (Azure Data Fundamentals) cover the concept at a higher level, so it appears in multiple certification paths. In DP-300, the context is more hands-on: candidates need to know how to configure DMS, set up VNets, and handle post-migration validation. The exam also covers migration of other database engines like MySQL and PostgreSQL, so familiarity with the entire Azure Database family is tested. Exam questions often include troubleshooting scenarios where a migration fails due to network connectivity or schema incompatibility, and the candidate must identify the correct fix. Because cloud migration is a real-world task, the exam expects you to understand not just the theory but also the practical steps and common pitfalls. Passing DP-300 requires a solid grasp of Azure Database Migration concepts, including the tools, the cutover process, and how to minimize user impact.

Simple Meaning

Imagine you have a large filing cabinet in your office that holds all your company’s records. Every time someone needs a file, they walk to that cabinet, open a drawer, and pull it out. Over time, you realize the cabinet is running out of space, it’s getting slow to find things, and it costs a lot to maintain. You decide to move all those files to a modern, giant warehouse that is managed by a professional team, where you can access any file instantly from your desk. This warehouse is like a cloud database. Azure Database Migration is the process of taking those files out of your old cabinet, carefully packing them, transporting them to the warehouse, and unpacking them so they are organized and ready to use.

The key challenge is that you cannot just shut down your business while the files are being moved. Your employees still need access to the information. Azure’s migration tools are like a team of movers who work at night, moving boxes one by one while the office is still running. They copy your files to the new warehouse, keep track of any changes made during the move, and then switch everything over in a final, quick step. This way, no one even notices the change happened. The tools handle different types of databases, like SQL Server, MySQL, PostgreSQL, and Oracle, and they check for compatibility issues before the move even begins. This means you do not have to worry about your old database not working in the new cloud environment. The whole process is designed to be safe, efficient, and as invisible as possible to your users.

Full Technical Definition

Azure Database Migration is a structured process that leverages several Microsoft tools and services to move database workloads from source environments (on-premises, IaaS VMs, or other clouds) to fully managed Azure data platforms like Azure SQL Database, Azure SQL Managed Instance, Azure Database for MySQL, Azure Database for PostgreSQL, or Azure Cosmos DB. The core tool is the Azure Database Migration Service (DMS), a fully managed service that orchestrates online and offline migrations with minimal downtime. For offline migrations, DMS performs a full data copy from the source to the target while the source database remains operational; then, at the cutover window, the source is taken offline briefly and the final delta of changes is synchronized. For online migrations, DMS uses continuous change tracking and replication, often leveraging features like SQL Server’s transactional replication or change data capture (CDC), to keep the target database nearly in sync with the source. At cutover, only a very brief pause is needed to apply the last changes and switch traffic.

Technically, the process begins with a pre-migration assessment phase, commonly using the Azure Database Migration Guide or the Data Migration Assistant (DMA). DMA analyzes the source database for compatibility issues such as unsupported features, deprecated data types, or blocking constructs. It generates a detailed report and suggests remediation steps. After the source is remediated, DMS handles the schema and data migration. For SQL Server, DMS uses the Data Migration Layer (DML) to move schema objects and bulk copy data. For online migrations, it sets up a continuous sync channel. The service supports multiple source-target pairs: SQL Server to Azure SQL Managed Instance, SQL Server to Azure SQL Database (single or elastic pool), MySQL to Azure Database for MySQL, PostgreSQL to Azure Database for PostgreSQL, and others. Security is built in: DMS requires an Azure Virtual Network (VNet) integration so that data moves over private IPs, and it uses certificate-based authentication for the service itself.

DMS also integrates with Azure Data Studio’s Azure Migration extension for a GUI-based experience. During migration, you can monitor progress, view errors, and pause or resume operations. After cutover, DMS performs validation checks to confirm data integrity. For large-scale migrations, you can use Azure Database Migration Projects to organize multiple database migrations under one umbrella. The service is regionally available and supports both homogeneous migrations (e.g., SQL Server to SQL Server in Azure) and some heterogeneous ones (e.g., Oracle to Azure SQL Database via DMS with additional tools). Real-world implementations often involve combining DMS with Azure Data Factory for additional data transformation or with Azure DevOps for CI/CD integration. Performance considerations include network bandwidth, source database size, and the number of concurrent migrations. DMS is built on Azure’s infrastructure, so it scales automatically, but you can configure additional load for large workloads.

Real-Life Example

Think of a large public library that wants to digitize its entire card catalog and move to a new digital system. The old catalog has thousands of drawers filled with paper cards, each containing information about a book. Library visitors still come in every day and need to find books, so the library cannot just close for a month. Azure Database Migration is like a team of librarians who design a new digital catalog system (the target database) and then begin copying card information into it. They start by scanning each card and entering the data into the new system. This is the initial full copy phase. While they are working, library patrons continue to use the old card drawers, and new books are added to the collection. The librarians note every new card that is added during the move. In the online migration approach, they set up a method where any new card added to the old system automatically gets a copy sent to the digital system. This is like change data capture.

Finally, on a chosen weekend night, the librarians perform the cutover. They lock the old card drawers for a few minutes, sync the last few new cards, and then open the new digital catalog system to the public. Patrons now use computers or apps to search for books, and the library can offer powerful search features and instant location tracking. The physical card drawers are removed. In this analogy, the old card drawers are your on-premises database, the digital system is Azure SQL Database, the librarians are the Azure Database Migration Service, and the nightly sync with new cards is the continuous replication. The key point is that the migration happens without the patrons ever noticing a disruption in service. The library gains better performance, easier maintenance, and new features, just as a company gains scalability, built-in backups, and high availability by moving to Azure.

Why This Term Matters

Azure Database Migration matters because modern businesses depend on databases for every critical operation—from customer transactions and inventory management to analytics and reporting. Keeping these databases running on old, on-premises hardware becomes increasingly expensive and risky. Hardware failures, security vulnerabilities, and the cost of specialized staff to maintain servers add up. By migrating databases to Azure, companies gain access to enterprise-grade features like automated backups, built-in disaster recovery, geo-replication, and elastic scaling. They no longer need to buy, patch, or replace servers. This directly lowers total cost of ownership and frees up IT teams to focus on building applications instead of babysitting hardware.

Moreover, migrating to Azure often improves performance because Azure databases are backed by high-speed SSD storage and have optimized networking. For example, moving a SQL Server database to Azure SQL Managed Instance can reduce query latency and provide automatic tuning. Security is another huge factor: Azure offers encryption at rest and in transit, advanced threat protection, and compliance certifications that many companies cannot achieve on their own. In real IT work, database migrations are a common project because companies are moving to the cloud at a rapid pace. A successful migration requires careful planning, testing, and execution. Azure Database Migration Service simplifies this by providing a repeatable, automated process that reduces human error. It also helps with challenges like schema incompatibility, large data volumes, and limited downtime windows. Without a proper migration tool, teams might have to write custom scripts, suffer extended outages, or risk data corruption. In short, Azure Database Migration is a core skill for any data professional working with Azure because it directly enables digital transformation, cost savings, and improved resilience.

How It Appears in Exam Questions

Exam questions about Azure Database Migration appear in several patterns. Scenario-based questions are the most common. For example, a question might describe a company with an on-premises SQL Server 2016 database of 500 GB that runs a critical e-commerce application. The company wants to move to Azure SQL Managed Instance and can tolerate only 30 minutes of downtime. The candidate must decide between an offline or online migration and explain why. The correct answer is online migration with continuous sync because the database is large and the downtime window is very tight. Another variant of this scenario might specify that the source server is behind a firewall, in which case the candidate must identify the need for a site-to-site VPN or Azure ExpressRoute for connectivity.

Another common question type is tool selection. The exam asks which tool to use for a specific task, such as assessing compatibility before migration. The answer is the Data Migration Assistant (DMA). Or it asks which service handles the actual data transfer for an online migration, and the answer is Azure Database Migration Service (DMS). Configuration questions test your knowledge of DMS settings, like what network requirements are needed (an Azure Virtual Network) or how to authenticate the service. Troubleshooting questions might present a scenario where a migration fails during the schema transfer phase, and the candidate must check the DMA report for unsupported features like CLR assemblies or file tables. Architecture questions may ask about the correct Azure resource hierarchy: for example, you must create an Azure Database Migration Service resource, then create a project, and then add a migration activity.

Finally, some questions compare migration approaches. For instance: “A company needs to migrate a small database of 10 GB and can afford several hours of downtime. What approach is most cost-effective?” The answer is an offline migration using a bacpac file because it is simpler and cheaper than setting up continuous sync. Candidates also see questions about post-migration steps, such as validating data integrity or updating connection strings. By understanding these question patterns, you can prepare by focusing on tool names, step-by-step processes, and the trade-offs between offline and online methods.

Study dp-300

Test your understanding with exam-style practice questions.

Practise

Example Scenario

Contoso Ltd. is a medium-sized logistics company that runs its shipment tracking system on a SQL Server 2014 database hosted on a physical server in their data center. The database is 200 GB and it is mission-critical for tracking parcels in real time.

The company has decided to move to Azure to reduce hardware costs and gain better disaster recovery. They choose Azure SQL Managed Instance as the target because they need full SQL Server compatibility. The IT team plans the migration for a weekend to minimize disruption.

They use the Data Migration Assistant to check for compatibility issues and find that the database uses a deprecated feature, partial contained databases, which must be addressed. After fixing this, they set up an Azure Database Migration Service instance in the same region as their target, configure it within a VNet, and establish a VPN connection to their on-premises network. They choose an online migration because the tracking system must remain available 24/7.

The migration begins on Friday evening with a full data copy, followed by continuous sync of changes. By Saturday morning, the target is nearly in sync. On Saturday night, they perform a brief cutover, taking the old database offline for five minutes to apply the final transactions.

After cutover, they point the tracking application to the new Azure database, test it, and confirm everything works. The migration is successful with zero data loss and minimal downtime. This scenario shows how Azure Database Migration enables a business to move to the cloud safely even for a round-the-clock application.

Common Mistakes

Confusing the Data Migration Assistant (DMA) with the Azure Database Migration Service (DMS).

DMA is only an assessment and schema remediation tool; it does not perform the actual data movement. DMS is the service that transfers data. Using DMA alone for migration will not move your data.

Use DMA to assess and fix compatibility issues, then use DMS to execute the actual migration.

Choosing an offline migration when the application cannot tolerate extended downtime.

Offline migration requires the source database to be taken offline for the entire duration of the data transfer, which could be hours or days for large databases. This would break the application.

For critical applications that need near-zero downtime, always choose online migration with continuous sync.

Forgetting to set up network connectivity between the source and the Azure target before starting the migration.

DMS needs network access to the source database and the target. Without a VPN, ExpressRoute, or a public endpoint properly configured, the migration will fail.

Ensure network connectivity is established and tested before creating the migration project. Use Azure VNet integration and appropriate firewall rules.

Starting the migration without running an assessment for compatibility issues.

Unsupported features or deprecated objects will cause the migration to fail midway, wasting time and risking data inconsistency.

Always run the Data Migration Assistant assessment first. Remediate all blocking issues before launching DMS.

Assuming all database objects will migrate automatically without manual verification.

Some objects like logins, SQL Agent jobs, or linked servers are not migrated by DMS and must be handled separately.

Create a check-list of all non-data objects. Use scripts or PowerShell to migrate logins and jobs separately after the data migration completes.

Exam Trap — Don't Get Fooled

The exam might describe a scenario where a company wants to migrate a 2 TB SQL Server database to Azure SQL Database single database. The scenario mentions that the source uses cross-database queries and the candidate needs to choose the correct target. Many learners incorrectly choose Azure SQL Database single database.

Read all scenario details carefully. If the source database uses features not supported in Azure SQL Database (like cross-database queries, CLR, or Service Broker), the correct target is Azure SQL Managed Instance, which offers near-full SQL Server compatibility. Always match the target capabilities to the source’s feature set.

Commonly Confused With

Azure Database MigrationvsAzure Data Factory (ADF)

Azure Data Factory is an ETL (extract, transform, load) service used for data integration and orchestration, not for direct database migrations. While ADF can move data, it does not perform the seamless, minimal-downtime cutover that DMS provides. Use DMS for database migration and ADF for ongoing data pipelines.

If you need to move your entire SQL Server database to Azure with little downtime, use DMS. If you need to copy daily sales data from an on-premises database to Azure for reporting, use ADF.

Azure Database MigrationvsAzure Backup for SQL Server in Azure VM

Azure Backup is for creating and managing backups, not for live migration. A backup restores a point-in-time copy to a new location, but it does not handle ongoing replication or cutover. Migration is about moving a live database with minimal downtime, whereas backup is about protecting data.

If you want to move your database to a managed service while it is still in use, use DMS. If you just want a nightly backup of your database for recovery purposes, use Azure Backup.

Azure Database MigrationvsDatabase export/import (bacpac/dacpac)

Bacpac export/import is a simpler offline method that exports the database schema and data into a single file, which you then import to Azure. It works well for small databases (under a few hundred GB) and where downtime is acceptable. DMS offers both offline and online options and is better for large databases and minimal downtime.

For a 5 GB database that can be offline for an hour, use bacpac export/import. For a 1 TB database that must stay online, use DMS online migration.

Step-by-Step Breakdown

1

Pre-migration Assessment

Use the Data Migration Assistant (DMA) to scan the source database for compatibility issues, deprecated features, and potential blockers. DMA generates a report and suggests fixes. This step ensures the target Azure database can support your current schema and features.

2

Target Environment Preparation

Provision the target Azure database service, such as Azure SQL Managed Instance or Azure SQL Database. Configure firewall rules, VNet integration, and authentication. Create a migration project in the Azure portal by setting up an Azure Database Migration Service resource.

3

Network Connectivity Setup

Establish network connectivity between the source environment and Azure. This could involve setting up a site-to-site VPN, Azure ExpressRoute, or opening firewall ports. DMS must be able to communicate with both the source and target databases over TCP/IP.

4

Schema Migration

DMS will migrate the schema (tables, indexes, stored procedures, views) from the source to the target. This is typically done before the data migration to create the structure. In some cases, DMA can also generate schema scripts for manual adjustment.

5

Data Migration and Synchronization

For online migrations, DMS performs a full data copy initially, then sets up continuous change replication to sync ongoing changes from the source to the target. The target remains in sync with the source throughout this phase. You can monitor the progress in the Azure portal.

6

Cutover and Validation

When the source and target are nearly in sync, you perform the cutover. This involves stopping all writes to the source database, applying the final changes to the target, and then switching application connection strings to the target. After cutover, run validation queries to confirm data integrity and application functionality.

7

Post-Migration Cleanup

Once the cutover is verified, you can decommission the old source database and servers. Update any remaining configuration such as SQL Agent jobs, logins, or linked servers that were not migrated by DMS. Finally, clean up temporary resources like the DMS instance if no longer needed.

Practical Mini-Lesson

To effectively plan and execute an Azure Database Migration, you must first understand the two primary types: offline and online. The choice depends on the size of your database and your tolerance for downtime. For a small database (under 100 GB) that can be offline for a few hours, an offline migration using DMS or even a simple bacpac export is perfectly fine. For a large or mission-critical database that cannot be taken offline, you must use online migration with DMS, which relies on change data capture (CDC) or transactional replication. This requires the source SQL Server to have some edition features, like Enterprise Edition for transactional replication, or at least a supported configuration for CDC.

Professionals should also be comfortable with the Data Migration Assistant (DMA) because it is a free, standalone tool that you run on the source machine. DMA will connect to the database, scan it, and produce a detailed assessment. It even provides a button to fix certain compatibility issues automatically. For example, if your source database uses deprecated data types like TEXT or IMAGE, DMA can suggest converting them to VARCHAR(MAX) or VARBINARY(MAX). Always run DMA before you even create a DMS project. This is a step many beginners skip, leading to failed migrations.

Another practical point is network planning. DMS requires an Azure Virtual Network (VNet) with a subnet dedicated to the service. You must configure Network Security Groups (NSGs) to allow outbound connectivity to the source database and inbound from Azure for management. If your source is on-premises, you need hybrid connectivity: either a site-to-site VPN over the internet or a private ExpressRoute circuit. The source database must also allow connections from the DMS subnet. This often means adding a firewall rule on the SQL Server or opening a port in the corporate firewall.

Common pitfalls during implementation include forgetting to migrate server-level objects like logins and SQL Agent jobs. DMS only moves user databases, not system-level objects. You have to script these out separately and apply them to the target. Also, be aware of the cost: DMS itself is a paid service, but the cost is usually justified by the time saved and reduced risk. After migration, you need to test the application thoroughly. Sometimes applications have hardcoded IP addresses or connection strings that must be updated. You can use Azure’s DNS features to avoid this in the future.

Finally, connect this concept to broader IT skills. Understanding migration helps you with disaster recovery planning, cloud architecture, and cost management. It also ties into DevOps practices: you can automate the migration using Azure CLI or PowerShell scripts. For example, you can create the DMS service, project, and migration activity entirely from the command line, making it repeatable. This is exactly the kind of automation that modern IT shops value. A solid grasp of Azure Database Migration will serve you well not only in exams but also in real-world cloud adoption projects.

Memory Tip

Think “DMA before DMS”: Assess first, then move. For downtime tolerance, remember “Small and slow? Go offline. Big and critical? Go online.”

Covered in These Exams

Related Glossary Terms

Frequently Asked Questions

What is the difference between offline and online migration in Azure Database Migration?

Offline migration involves copying the entire database while the source is still running, then a brief shutdown to sync the remaining changes. Online migration uses continuous replication so that the target stays in sync, allowing a very short outage (often under five minutes) at cutover.

Do I need the Data Migration Assistant if I am using Azure Database Migration Service?

Yes, you should always run the Data Migration Assistant first to identify any compatibility issues. Fixing these before using DMS prevents failures and saves time.

Can I migrate from Oracle or MySQL to Azure SQL Database using DMS?

DMS supports migrating from MySQL to Azure Database for MySQL and from PostgreSQL to Azure Database for PostgreSQL. For Oracle to Azure SQL Database, you typically need additional tools like Azure Data Factory or third-party solutions, though DMS has some support for this in preview.

How long does an Azure Database Migration typically take?

The time depends on the database size, network bandwidth, and the type of migration. An offline migration of a 100 GB database over a 1 Gbps connection could take about 15-30 minutes. Online migrations take longer because they first copy the full data and then stream changes.

What happens to the source database after migration?

After a successful cutover, the source database remains untouched until you decommission it. It is recommended to keep the source running for a short validation period to ensure everything works correctly in Azure before shutting it down.

Is Azure Database Migration Service free?

No, DMS is a paid service. You are charged based on the compute hours used by the migration service instance. However, if you use an Azure Free Account or certain credits, you may be able to cover the cost for initial testing.

Summary

Azure Database Migration is a structured, tool-supported process for moving databases from on-premises or other clouds to Azure’s managed database platforms. It is a critical skill for database administrators and cloud architects because it directly enables digital transformation by reducing costs, improving security, and providing scalable performance. The key tools are the Data Migration Assistant for assessment and the Azure Database Migration Service for the actual data transfer, with options for both offline and online migrations to suit different downtime requirements.

In certification exams like DP-300, you will be tested on your ability to choose the correct migration approach, configure the tools, and troubleshoot common issues. Remember to always assess first, plan your network connectivity, and consider the target’s feature compatibility. Mastering this topic not only helps you pass exams but also prepares you for real-world cloud adoption projects that are common across industries.