SQL to Azure SQL Migration

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.

~$3,800/mo
9
Azure Services
~$3,800
Monthly Cost
3 Targets
SQL DB, SQL MI, SQL VM
99.97%
Composite SLA

Overview

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.

Key Characteristics
  • Azure Migrate + DMA for database assessment and compatibility analysis
  • Azure Database Migration Service for online/offline migration
  • Three target options: Azure SQL Database (PaaS), SQL Managed Instance (near 100% compat), SQL on Azure VM (full compat)
  • Azure Hybrid Benefit for cost savings (BYOL)
  • Transparent Data Encryption (TDE) for all targets
  • Auto-failover groups for HA/DR
Migration Phases
Phase 1Assess
Phase 2Migrate
Phase 3Target
Target Options
SQL DBPaaS
SQL MIPaaS
SQL VMIaaS
Data Protection
EncryptionTDE (default)
AuthEntra ID

T-Shirt Sizing

Small

Dev / Test

  • Azure SQL Database (S2, 50 DTU)
  • Single database, basic DTU model
  • No DMS (manual backup/restore)
~$150/mo

Medium

Production

  • Azure SQL Managed Instance (GP, 4 vCores)
  • 5-10 databases, auto-failover group
  • DMS online migration
~$3,800/mo

Large

Enterprise

  • SQL MI Business Critical (8+ vCores)
  • 50+ databases, read replicas
  • Azure Purview for data governance
~$9,500/mo

SQL Target Comparison

FeatureAzure SQL DBSQL Managed InstanceSQL on Azure VM
Compatibility~95%~99%100%
ManagementFully managedFully managedSelf-managed
HADRBuilt-inAuto-failover groupsAlways On AG
Max Size4TB (Hyperscale: 100TB)16TBUnlimited
Cost ModelDTU or vCorevCoreVM + SQL license
Best ForNew cloud-native appsLift & shift with minimal changesFull SQL Server feature parity
Cross-DB QueriesNo (use Elastic)YesYes
SQL AgentNoYesYes
CLRNoYesYes
Linked ServersNoYesYes

Architecture Diagram

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
          

Bill of Materials

#ServiceSKU / TierPurposeMonthly Cost
1Azure SQL MIGP 4 vCores, 256GBPrimary database target~$1,500
2Azure SQL DatabaseGP S_Gen5_2Cloud-native app databases~$370
3SQL on Azure VMD4s_v5 + SQL StdLegacy apps (full compatibility)~$620
4Azure DMSStandardOnline migration engine~$410
5Azure MigrateFreeDiscovery & assessmentFree
6Key VaultStandardTDE keys, connection strings~$5
7Log AnalyticsPerGB2018SQL Insights, auditing~$35
8Azure BackupVaultSQL VM backup (PITR built-in for MI/DB)~$60
9VNet + PENetwork + 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.

Service Breakdown

Azure SQL Managed Instance
GP 4 vCores~$1,500/mo

Near 100% SQL Server compatibility. VNet-native, auto-failover groups, built-in HADR. Best for most lift-and-shift migrations.

Azure SQL Database
GP S_Gen5_2~$370/mo

Fully managed, auto-patching, serverless option. Built-in intelligence (auto-tuning). Best for new or cloud-optimized workloads.

SQL on Azure VM
D4s_v5~$620/mo

Full SQL Server feature parity. Windows/Linux support. Use for CLR, SSIS, legacy features not in MI. Azure Hybrid Benefit eligible.

Database Migration Service
Standard~$410/mo

Online migration with near-zero downtime. Supports SQL Server 2005+ to all Azure SQL targets. Change data capture for continuous sync.

Data Migration Assistant
Free

Pre-migration assessment: feature parity, deprecation, breaking changes. Generates SKU recommendations based on workload.

Azure Backup + PITR
Vault~$60/mo

SQL MI/DB: built-in Point-in-Time Restore (7-35 days). SQL VM: Azure Backup agent with app-consistent snapshots. Geo-redundant vault.

Security & Networking

Network
  • SQL MI: VNet-native (dedicated subnet /27 minimum)
  • SQL DB: Private Endpoints for private connectivity
  • SQL VM: NSG-protected subnet, no public IP
  • Deny public network access on all SQL resources
  • Private DNS zones (privatelink.database.windows.net)
Identity & Data
  • Entra ID authentication (replace SQL auth)
  • Transparent Data Encryption (TDE) — enabled by default
  • Advanced Threat Protection on all SQL targets
  • Azure Defender for SQL (vulnerability assessment, alerts)
  • Auditing to Log Analytics (SQL Insights)
  • Managed Identity for app-to-database auth

Use Cases

ERP Database Migration

Move SAP, Dynamics, or custom ERP databases to SQL MI with near-zero downtime using DMS online migration.

Multi-Database Consolidation

Consolidate 50+ SQL Server instances across offices into elastic pools or SQL MI with instance-level management.

Dev/Test Database Modernization

Clone production to Azure SQL Database serverless for dev/test at fraction of the cost with auto-pause.

Compliance-Driven Migration

Meet GDPR, HIPAA, SOC 2 with built-in encryption, auditing, and Advanced Threat Protection in Azure SQL.

Constraints & Considerations

ConstraintMitigation
SQL MI deployment takes 4-6 hoursPlan ahead; use deployment windows
SQL MI subnet requires /27 minimum, no other resourcesReserve dedicated subnet in VNet design
Cross-database queries not supported in SQL DBUse SQL MI or Elastic Query for cross-DB
SSIS/SSRS not available in SQL DB or MIUse ADF for ETL (replaces SSIS), Power BI (replaces SSRS)
Large databases (>1TB) slow to migrate onlineUse backup/restore for initial seed, then DMS for catch-up
Ready to Deploy This Pattern?

Generate a complete deployment spec sheet with GitHub Actions workflow, Bicep file structure, and prerequisite checklist.

Generate Deployment Spec Sheet