Comprehensive database migration from SQL Server on VMs to Azure SQL — covering Azure SQL Database, Azure SQL Managed Instance, and SQL on Azure VM. CAF-aligned with Azure Database Migration Service.
The SQL to Azure SQL Migration pattern provides a structured approach to moving on-premises SQL Server databases to the optimal Azure SQL target. Using Azure Database Migration Service (DMS), Azure Migrate, and Data Migration Assistant (DMA), organizations can assess compatibility, choose the right target, and execute online migrations with minimal downtime.
This is the ideal pattern for organizations that need to modernize their database tier while choosing the right Azure SQL variant for each workload.
| Phase 1 | Assess |
| Phase 2 | Migrate |
| Phase 3 | Target |
| SQL DB | PaaS |
| SQL MI | PaaS |
| SQL VM | IaaS |
| Encryption | TDE (default) |
| Auth | Entra ID |
Dev / Test
Production
Enterprise
| Feature | Azure SQL DB | SQL Managed Instance | SQL on Azure VM |
|---|---|---|---|
| Compatibility | ~95% | ~99% | 100% |
| Management | Fully managed | Fully managed | Self-managed |
| HADR | Built-in | Auto-failover groups | Always On AG |
| Max Size | 4TB (Hyperscale: 100TB) | 16TB | Unlimited |
| Cost Model | DTU or vCore | vCore | VM + SQL license |
| Best For | New cloud-native apps | Lift & shift with minimal changes | Full SQL Server feature parity |
| Cross-DB Queries | No (use Elastic) | Yes | Yes |
| SQL Agent | No | Yes | Yes |
| CLR | No | Yes | Yes |
| Linked Servers | No | Yes | Yes |
graph TB
subgraph OnPrem["On-Premises SQL Servers"]
SQL1["SQL Server 2016<br/>Production (500GB)"]
SQL2["SQL Server 2019<br/>ERP Database"]
SQL3["SQL Server 2014<br/>Legacy App DB"]
end
subgraph Assessment["Phase 1 — Assess & Plan"]
DMA["Data Migration Assistant<br/>Compatibility Report"]
MIGRATE["Azure Migrate<br/>SQL Discovery"]
SKU["SKU Recommendation<br/>Right-sizing"]
end
subgraph Migration["Phase 2 — Migrate"]
DMS["Database Migration Service<br/>Online Migration"]
BACPAC["BACPAC / Backup<br/>Offline Migration"]
end
subgraph Targets["Phase 3 — Azure SQL Targets"]
subgraph PaaS["Fully Managed PaaS"]
SQLDB["Azure SQL Database<br/>vCore GP 4-core<br/>Serverless available"]
SQLMI["SQL Managed Instance<br/>GP 4 vCores<br/>Near-100% compatible"]
end
subgraph IaaS["IaaS (Full Control)"]
SQLVM["SQL on Azure VM<br/>D4s_v5 + SQL Std<br/>100% compatible"]
end
end
subgraph Support["Supporting Services"]
KV["Key Vault<br/>TDE & Secrets"]
LAW["Log Analytics<br/>SQL Insights"]
BKUP["Automated Backup<br/>PITR 7-35 days"]
AAD["Entra ID Auth<br/>Managed Identity"]
end
SQL1 -->|"Assess"| DMA
SQL2 -->|"Assess"| DMA
SQL3 -->|"Assess"| DMA
DMA --> SKU
MIGRATE --> SKU
SKU -->|"High compat"| DMS
SKU -->|"Low compat"| BACPAC
DMS -->|"Online"| SQLMI
DMS -->|"Online"| SQLDB
BACPAC -->|"Offline"| SQLVM
SQLDB --> KV
SQLMI --> KV
SQLVM --> KV
SQLDB --> LAW
SQLMI --> LAW
SQLVM --> LAW
| # | Service | SKU / Tier | Purpose | Monthly Cost |
|---|---|---|---|---|
| 1 | Azure SQL MI | GP 4 vCores, 256GB | Primary database target | ~$1,500 |
| 2 | Azure SQL Database | GP S_Gen5_2 | Cloud-native app databases | ~$370 |
| 3 | SQL on Azure VM | D4s_v5 + SQL Std | Legacy apps (full compatibility) | ~$620 |
| 4 | Azure DMS | Standard | Online migration engine | ~$410 |
| 5 | Azure Migrate | Free | Discovery & assessment | Free |
| 6 | Key Vault | Standard | TDE keys, connection strings | ~$5 |
| 7 | Log Analytics | PerGB2018 | SQL Insights, auditing | ~$35 |
| 8 | Azure Backup | Vault | SQL VM backup (PITR built-in for MI/DB) | ~$60 |
| 9 | VNet + PE | — | Network + Private Endpoints | ~$40 |
| Estimated Total (Medium Production) | ~$3,800/mo | |||
Costs based on Medium (Production) sizing. Small dev/test deployments start at ~$150/mo. Enterprise deployments with Business Critical MI reach ~$9,500/mo.
Near 100% SQL Server compatibility. VNet-native, auto-failover groups, built-in HADR. Best for most lift-and-shift migrations.
Fully managed, auto-patching, serverless option. Built-in intelligence (auto-tuning). Best for new or cloud-optimized workloads.
Full SQL Server feature parity. Windows/Linux support. Use for CLR, SSIS, legacy features not in MI. Azure Hybrid Benefit eligible.
Online migration with near-zero downtime. Supports SQL Server 2005+ to all Azure SQL targets. Change data capture for continuous sync.
Pre-migration assessment: feature parity, deprecation, breaking changes. Generates SKU recommendations based on workload.
SQL MI/DB: built-in Point-in-Time Restore (7-35 days). SQL VM: Azure Backup agent with app-consistent snapshots. Geo-redundant vault.
privatelink.database.windows.net)Move SAP, Dynamics, or custom ERP databases to SQL MI with near-zero downtime using DMS online migration.
Consolidate 50+ SQL Server instances across offices into elastic pools or SQL MI with instance-level management.
Clone production to Azure SQL Database serverless for dev/test at fraction of the cost with auto-pause.
Meet GDPR, HIPAA, SOC 2 with built-in encryption, auditing, and Advanced Threat Protection in Azure SQL.
| Constraint | Mitigation |
|---|---|
| SQL MI deployment takes 4-6 hours | Plan ahead; use deployment windows |
| SQL MI subnet requires /27 minimum, no other resources | Reserve dedicated subnet in VNet design |
| Cross-database queries not supported in SQL DB | Use SQL MI or Elastic Query for cross-DB |
| SSIS/SSRS not available in SQL DB or MI | Use ADF for ETL (replaces SSIS), Power BI (replaces SSRS) |
| Large databases (>1TB) slow to migrate online | Use backup/restore for initial seed, then DMS for catch-up |
Generate a complete deployment spec sheet with GitHub Actions workflow, Bicep file structure, and prerequisite checklist.
Generate Deployment Spec Sheet