You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Migrating databases to Azure is a critical step for organisations moving to the cloud. The Azure Database Migration Service (DMS) is a fully managed service designed to enable seamless database migrations with minimal downtime. This lesson covers migration planning, DMS capabilities, supported scenarios, and best practices.
Manual database migration — exporting data, transferring files, importing to the target — is error-prone, time-consuming, and often requires extended downtime. DMS automates and simplifies this process:
| Benefit | Description |
|---|---|
| Minimal downtime | Online migrations keep the source database operational |
| Automated assessment | Identifies compatibility issues before migration |
| Managed service | No infrastructure to provision or manage |
| Multiple sources | Supports SQL Server, PostgreSQL, MySQL, MongoDB, Oracle |
| Multiple targets | Azure SQL Database, SQL Managed Instance, PostgreSQL, MySQL, Cosmos DB |
| Progress monitoring | Track migration status in the Azure Portal |
The source database is taken offline during migration:
Source DB (offline) → DMS → Target DB (Azure)
| Aspect | Detail |
|---|---|
| Downtime | Required for the full duration of the migration |
| Complexity | Simple — single pass |
| Data consistency | Guaranteed at the point of snapshot |
| Best for | Small databases, planned maintenance windows |
The source database remains operational during migration:
Phase 1: Full data load
Source DB (online) → DMS → Target DB (Azure)
Phase 2: Continuous sync (change data capture)
Source DB changes → DMS → Target DB (Azure)
Phase 3: Cutover
Stop source → Verify target → Switch application connections
| Aspect | Detail |
|---|---|
| Downtime | Only during the brief cutover (seconds to minutes) |
| Complexity | Higher — requires change tracking on the source |
| Data consistency | Continuous sync ensures the target is current at cutover |
| Best for | Production databases that cannot tolerate extended downtime |
| Source | Target | Mode |
|---|---|---|
| SQL Server (on-premises) | Azure SQL Database | Online and offline |
| SQL Server (on-premises) | Azure SQL Managed Instance | Online and offline |
| SQL Server (on-premises) | SQL Server on Azure VM | Online and offline |
| Azure SQL Database | Azure SQL Managed Instance | Offline |
| SQL Server (AWS RDS) | Azure SQL Database / MI | Online and offline |
| Source | Target | Mode |
|---|---|---|
| PostgreSQL (on-premises) | Azure Database for PostgreSQL | Online and offline |
| AWS RDS for PostgreSQL | Azure Database for PostgreSQL | Online and offline |
| Azure Database for PostgreSQL (Single Server) | Flexible Server | Online |
| Source | Target | Mode |
|---|---|---|
| MySQL (on-premises) | Azure Database for MySQL | Online and offline |
| AWS RDS for MySQL | Azure Database for MySQL | Online and offline |
| Source | Target | Mode |
|---|---|---|
| MongoDB (on-premises) | Azure Cosmos DB (MongoDB API) | Online and offline |
| MongoDB Atlas | Azure Cosmos DB (MongoDB API) | Online and offline |
| AWS DocumentDB | Azure Cosmos DB (MongoDB API) | Online and offline |
| Source | Target | Mode |
|---|---|---|
| Oracle | Azure Database for PostgreSQL | Offline (with ora2pg) |
Before migrating, assess your source databases for compatibility:
Azure Migrate — a central hub for discovery and assessment:
Data Migration Assistant (DMA) — for SQL Server migrations:
Azure Database Migration Assessment — built into DMS for PostgreSQL and MySQL:
Based on the assessment, plan your migration:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.