0Pricing
Azure Fundamentals · Lesson

Database Migration Best Practices

Use the Azure Database Migration Service to migrate a SQL Server database to Azure SQL with minimal downtime, and resolve common schema and compatibility issues.

Why Database Migration Is Different

Migrating a database is more complex than lifting a VM because databases are stateful and often have active connections 24/7. A naïve copy-and-restore approach requires hours of downtime, which is unacceptable for production systems. Best-practice database migration uses continuous data replication to keep source and target in sync while the target is validated, then performs a brief, planned cutover when traffic is redirected to the new Azure database.

Azure Database Migration Service

Azure Database Migration Service (DMS) is a fully managed service that orchestrates online (near-zero-downtime) and offline (downtime-based) migrations from popular on-premises engines to Azure managed database services. DMS supports sources including SQL Server, MySQL, PostgreSQL, MongoDB, Oracle, and targets including Azure SQL Database, Azure SQL Managed Instance, Azure Database for MySQL, and Azure Cosmos DB. The service integrates with Data Migration Assistant (DMA) for pre-migration compatibility checks.

# Create a DMS instance
az dms create \
  --service-name myDMS \
  --resource-group myRG \
  --location eastus \
  --sku-name Premium_4vCores \
  --vnet myVnet \
  --subnet mySubnet

All lessons in this course

  1. The 6-Rs Migration Framework
  2. Azure Migrate: Discovery and Assessment
  3. Rehost with Azure Migrate (Lift and Shift)
  4. Database Migration Best Practices
← Back to Azure Fundamentals