Cloud Database Migration Guide: On-Premises SQL to AWS RDS, Azure SQL, and GCP Cloud SQL
Why Migrate Databases to Managed Services?
Self-managed databases on cloud VMs require ongoing patching, backup management, HA configuration, and DBA time. Managed services eliminate these tasks. The trade-off: slightly higher compute cost, but significantly lower operational overhead and risk.
Database Migration Tools by Provider
| Migration Scenario | AWS Tool | Azure Tool | GCP Tool |
|---|---|---|---|
| On-prem to cloud | AWS DMS + SCT | Azure Database Migration Service | Database Migration Service |
| Homogeneous (same engine) | DMS | Azure DMS | DMS |
| Heterogeneous (engine change) | SCT + DMS | SSMA + DMS | DMS + schema conversion |
SQL Server Migration Options
Option 1: SQL Server on VM (IaaS)
Most compatible, least managed. Install SQL Server on a VM — works exactly like on-premises. Best for: complex SQL Agent jobs, linked servers, CLR functions, full text search with custom configurations.
| Cloud | 8vCPU SQL VM | SQL Licence Included | Total/Month |
|---|---|---|---|
| AWS | $280 (m7i.2xlarge) | +$600 (EE est.) | ~$880 |
| Azure | $280 (D8s v5) | +$740 (EE est.) | ~$1,020 |
| GCP | $284 (n2-std-8) | +$590 (EE est.) | ~$874 |
Option 2: Managed SQL Server (PaaS)
Azure SQL Managed Instance offers near-100% SQL Server compatibility. AWS has RDS for SQL Server. No OS management, automatic patching, built-in HA.
Option 3: Open Source Migration
Migrate from SQL Server to PostgreSQL or MySQL — eliminates SQL Server licence costs entirely. Requires schema conversion and application testing. Tools: AWS SCT (Schema Conversion Tool), pgloader, Babelfish (AWS Postgres with SQL Server dialect compatibility).
PostgreSQL / MySQL Migration Costs
| Service | 8vCPU/32GB HA (Multi-AZ) | 100GB Storage | Total/Month |
|---|---|---|---|
| AWS RDS PostgreSQL | $580 | $23 | $603 |
| Azure DB for PostgreSQL | $560 | $23 | $583 |
| GCP Cloud SQL PostgreSQL | $540 | $34 | $574 |
| OCI MySQL HeatWave | $140 | $6 | $146 |
Migration Phases
- Discovery: Catalogue all databases, assess schema complexity, identify dependencies
- Schema conversion: Convert DDL, stored procedures, functions to target engine
- Data migration: Initial full load + ongoing change data capture (CDC) for near-zero downtime
- Testing: Application compatibility, performance benchmarking, regression testing
- Cutover: Final sync, DNS/connection string update, validation
- Decommission: Remove source database after validation period
Common Pitfalls
- Underestimating schema conversion complexity for stored procedures
- Not accounting for character set differences (especially emoji/UTF-8MB4)
- Forgetting SQL Agent jobs and scheduled tasks
- Missing linked server dependencies
- Network bandwidth bottlenecks during initial data load
For organisations paying SQL Server Enterprise licences, migrating to PostgreSQL on managed cloud services can save $2,000-5,000 per server per month in licence costs alone — often covering the entire cloud migration budget.
Ready to Calculate Your Cloud Costs?
Use TCOIQ's free comparison tool or build a full inventory across all 5 clouds.