Roadmap › 3. Cloud & DevOps › Step 39
AzDB
Azure Databases — Azure SQL, Managed Instance, Cosmos DB, PostgreSQL and Migration
Choosing a database on Azure; Azure SQL Database (single database, elastic pools, DTU vs vCore, General Purpose / Business Critical / Hyperscale, serverless), Azure SQL Managed Instance and SQL Server on Azure VMs; security (firewall, private endpoints, Microsoft Entra authentication, managed identity, TDE, Always Encrypted, auditing), high availability, geo-replication, failover groups and backups/point-in-time restore; performance (Query Store, automatic tuning, Intelligent Insights); Cosmos DB (APIs, partition keys, RU/s, consistency levels), Azure Database for PostgreSQL/MySQL, Azure Cache for Redis; migrating on-premises SQL Server (DMA, Azure Database Migration Service) and cost optimisation.
What it is & where it is used
| Service | Type | Choose when |
|---|---|---|
| Azure SQL Database | PaaS, one database (or elastic pool) | New cloud apps on SQL Server — no server to manage |
| Azure SQL Managed Instance | PaaS, near-100 % SQL Server instance compatibility | Lift-and-shift of on-prem SQL Server using SQL Agent, cross-database queries, CLR, Service Broker, linked servers |
| SQL Server on Azure VM | IaaS | Need full OS/instance control, SSRS/SSIS/SSAS on the same box, unsupported features |
| Azure Cosmos DB | Globally distributed NoSQL (multi-API) | Massive scale, single-digit-ms reads, flexible JSON, multi-region writes |
| Azure Database for PostgreSQL (Flexible Server) / MySQL | Managed open-source databases | Apps built for Postgres/MySQL |
| Azure Cache for Redis / Azure Managed Redis | In-memory cache | Caching, sessions, leaderboards |
| Azure Synapse / Microsoft Fabric warehouse | Analytics | Data warehousing and BI at scale |
Azure SQL Database runs the same SQL Server engine (always the latest version), so T-SQL skills transfer directly — but some instance-level features differ (no SQL Agent in single databases — use Elastic Jobs/Azure Functions/Logic Apps; no cross-database queries without elastic query; no USE to switch databases).
Versions & history
| Year | Milestone |
|---|---|
| 2010 | SQL Azure (first cloud SQL Server service) |
| 2014–2016 | Azure SQL Database service tiers (Basic/Standard/Premium, DTU), elastic pools, geo-replication, Query Store, TDE by default |
| 2017 | Cosmos DB (from DocumentDB), Azure Database for PostgreSQL/MySQL |
| 2018 | SQL Managed Instance GA, vCore purchasing model, Hyperscale preview |
| 2019 | Serverless compute tier, Hyperscale GA |
| 2020–2022 | Azure SQL "family" branding, ledger, Azure AD-only auth, Cosmos DB serverless and autoscale |
| 2023–2024 | Managed Instance next-gen General Purpose, free Azure SQL Database offer (per subscription), Hyperscale price reductions, vector search previews |
| 2025 | Native vector type and JSON type in Azure SQL, SQL database in Microsoft Fabric, Cosmos DB vector search GA |
Lifecycle
Moving a .NET app's database to Azure SQL:
- Assess the on-prem database (Azure Migrate / Data Migration Assistant / SQL Server migration extension in Azure Data Studio's successor tools) for compatibility and target size.
- Choose the target: Azure SQL Database (new/modern apps), Managed Instance (instance features), VM (full control).
- Provision with Bicep/Terraform/CLI: logical server, database, service tier, networking (private endpoint), Entra admin.
- Migrate schema + data: Azure Database Migration Service (online/offline), BACPAC import, transactional replication or log shipping (MI link) for minimal downtime.
- Switch the app: new connection string (managed identity), retry logic for transient faults, test performance.
- Operate: monitoring (Azure Monitor, Query Store), automatic tuning, alerts, backups/PITR, geo-replication/failover groups, cost reviews.
Tools used to develop
- Azure Portal, Azure CLI (
az sql), PowerShell (Az.Sql), Bicep/Terraform. - SSMS, VS Code MSSQL extension,
sqlcmd/sqlpackage(BACPAC/DACPAC), SQL database projects (SDK-style) for schema CI/CD. - Azure Database Migration Service, Azure Migrate, Data Migration Assistant.
- Monitoring: Query Performance Insight, Query Store, Azure Monitor metrics/alerts, Database Watcher, Defender for SQL.
- Cosmos DB: Data Explorer, .NET SDK v3, Cosmos DB emulator.