Designing Relational Database Solutions: Azure SQL Options, Sizing, High Availability and Migration Paths
Decision Tree
- Is it open source (PostgreSQL, MySQL, MariaDB)? Use the flexible server services
- Need OS access or a version or feature PaaS does not offer? SQL Server on a VM
- Need near full SQL Server compatibility (SQL Agent, cross-database queries, linked servers, CLR)? SQL Managed Instance
- Otherwise: Azure SQL Database (single database or elastic pool)
Choosing Tiers
| Need | Choice |
| General business app | General Purpose (vCore) |
| Low-latency, high IO, readable replica, fast failover | Business Critical |
| Very large (up to about 100 TB), fast scale and restore | Hyperscale |
| Spiky or dev/test, pay per use | Serverless with auto-pause |
| Many tenant databases with different peaks | Elastic pool |
| Simple small workload | DTU Basic or Standard (or small vCore) |
High Availability and DR Design
| Requirement | Design |
| Survive a datacenter failure | Zone-redundant configuration |
| Survive a region failure with a stable endpoint | Auto-failover group to a second region |
| Read-scale or reporting | Readable secondary (Business Critical, Hyperscale named replicas, geo-secondary) |
| Recover from user mistakes | Point-in-time restore and long-term retention |
| Very low RPO and RTO | Business Critical with zone redundancy + failover group |
Security Design
- Entra-only authentication with managed identities for apps
- Private endpoint, disable public access
- TDE with optional customer-managed key, Always Encrypted for column secrets
- Auditing, Defender for SQL, dynamic data masking, row-level security
- Network isolation for Managed Instance in its own subnet
PostgreSQL and MySQL Flexible Server
- Zone-redundant HA, automated backups, read replicas, VNet or private endpoint
- Stop and start servers to save cost in dev/test
- Choose when an app already uses these engines and you want managed operations
Migrating SQL Server
| Source | Target | Tool |
| SQL Server with simple needs | Azure SQL Database | Azure Database Migration Service, Data Migration Assistant, SQL migration extension |
| SQL Server with Agent and linked servers | Managed Instance | DMS online migration or log replay, native backup restore |
| Cannot change anything | SQL on VM | Backup/restore, Azure Migrate |
| Oracle or other engines | Azure SQL or PostgreSQL | Assessment and conversion tools, test thoroughly |
Assess first Run an assessment for compatibility, performance and sizing before choosing the target.
Scenario
A retailer has a 2 TB SQL Server 2016 with SQL Agent jobs and cross-database queries. Needs 99.99% and region DR with minimal change. Choose SQL Managed Instance Business Critical, zone redundant, with an auto-failover group, migrate using DMS online mode, use Hybrid Benefit and a 3-year reservation.
Practice
- Pick the service for five situations
- Design DR for an app with RPO 5 minutes
- List security controls to add to a new database
Conclusion
Choose the least-managed-effort platform that meets compatibility needs: SQL Database first, Managed Instance for compatibility, VMs only when required. Add zones, failover groups and strong security.
Quick Summary: decision tree; tiers; HA/DR; security; open source; migration; scenario.