Skip to main content

Azure SQL Deployment Options

The Decision Tree

The #1 question on DP-300: "Which deployment option should you recommend?" Use this mental model:

Decision Tree — Which Azure SQL Deployment?
Need OS access or 3rd-party software?
YES → SQL Server on VM (IaaS)
Migrating from on-prem SQL Server?
YES + Need Agent/CLR/cross-DB → Managed Instance
YES + Simple DB → check size below
Database larger than 4 TB?
YES → Hyperscale (up to 100 TB)
Greenfield / cloud-native app?
YES → Azure SQL Database (PaaS)
NO → Managed Instance
ResultWhen to Choose
🔴 SQL Server on VMOS access, FILESTREAM, MSDTC, 3rd-party software
🔵 Managed InstanceLift-and-shift migration, need Agent/CLR/cross-DB, ~99% compat
🟢 Azure SQL DatabaseGreenfield cloud-native apps, serverless, elastic pools
🟣 HyperscaleDatabases > 4 TB, up to 100 TB, instant backups

Comparison Matrix

FeatureAzure SQL DatabaseSQL Managed InstanceSQL Server on VM
TypePaaSPaaSIaaS
Compatibility~95% T-SQL~99% SQL Server100% SQL Server
You manageQueries, indexes, security+ Agent jobs, instance settings+ OS, patching, HA config
Microsoft managesPatching, HA, backups, OSPatching, HA, backups, OSHardware only
OS Access
Max Size100 TB (Hyperscale)16 TBUnlimited
Agent Jobs❌ (Use Elastic Jobs)
Cross-DB QueriesElastic Query only✅ (USE works)
CLR
Linked Servers
FILESTREAM
MSDTC
🎯 Exam Focus

The migration evaluation order: MI first → VM only if MI can't support the workload → SQL DB for greenfield. This is the official Microsoft recommendation and appears frequently in exam scenarios.

Azure SQL Database — Architecture Deep Dive

Fully managed database engine. Think of it as "database as a service" — you never touch the instance.

Architecture

Azure SQL Database uses a Logical Server as a management boundary (not a compute instance). Each database gets its own compute + storage. Security policies (firewall, auditing, TDE) are set at server level.

Key architectural concepts:

  • Logical server = management container (firewall rules, admin login, auditing). NOT a compute instance.
  • Each database has its own compute + storage (they don't share unless in an Elastic Pool).
  • Elastic Pools = shared DTU/vCore budget across multiple databases. Perfect for SaaS (database-per-tenant).

Purchasing Models (Critical for Exam)

DTU ModelvCore Model
AnalogyMeal deal (bundled)A la carte (pick components)
CPUAbstractedExplicit vCore count
StorageIncluded per tierIndependent — pay for what you provision
Serverless✅ (auto-pause to $0 compute)
Hyperscale✅ (up to 100 TB)
Azure Hybrid Benefit✅ (save up to 55%)
Best forSimple/dev workloadsProduction, migrations, cost optimization
🎯 Exam Focus

Three facts the exam loves: 1) Azure Hybrid Benefit = vCore only. 2) SQL Managed Instance = vCore only (no DTU). 3) Serverless and Hyperscale = vCore only. If the question mentions any of these → answer involves vCore.

SQL Managed Instance — Architecture Deep Dive

Best for lift-and-shift migrations. Think of it as "SQL Server instance as a service".

MI Architecture
🌐
VNet-Native Deployment
• Deployed inside YOUR VNet in a dedicated subnet (/27 min)
• Apps connect via MI Gateway
• On-prem connects via VPN/ExpressRoute
• Subnet must be dedicated — no other resources allowed
⚙️
Two Service Tiers
• General Purpose: Remote Premium Storage, RBPEX cache, ~5-10ms latency, failover ~30s
• Business Critical: Local NVMe SSD, 4 Always On replicas, ~1-2ms latency, failover ~5-10s, 1 free read replica

Key architectural concepts:

  • VNet-native — deployed inside YOUR virtual network (unlike SQL DB which has a public endpoint by default)
  • SQL Agent — fully supported (critical for migrations from on-prem)
  • Cross-database queriesUSE [OtherDB] just works (SQL DB can't do this)
  • Link feature — near real-time replication from on-prem SQL Server (great for staged migrations)
  • Subnet must be dedicated — no other resources allowed, minimum /27
🏢 Real-World DBA Note

Oracle DBA parallel: MI is like having a CDB/PDB architecture — one instance, multiple databases, cross-DB queries work natively. SQL DB is more like a single PDB — isolated, no cross-DB.

SQL Server on Azure VMs — When You Need Full Control

Full SQL Server, full OS access. Use when you need:

  • FILESTREAM, MSDTC — not supported in MI
  • Third-party software on the same server (backup agents, monitoring tools)
  • Exact SQL Server version matching (e.g., SQL 2016 compatibility)
  • Cluster features not available in MI (FCIs with shared disks)

Key architectural fact: Register SQL VMs with the SQL IaaS Agent extension to get:

  • Automated backups, patching, and monitoring
  • Storage configuration optimization
  • Azure portal integration
  • License management (AHB tracking)

SQL VM Storage Architecture

SQL VM Disk Layout
🟥
Data Disk(s)
Premium SSD / Ultra Disk
.mdf & .ndf files
Caching: Read-Only
🟦
Log Disk
Premium SSD / Ultra Disk
.ldf files
Caching: None
🟨
TempDB
Local NVMe SSD (D: drive)
Ephemeral — fast & free
Lost on VM restart
Backup
Azure Blob Storage
.bak files
BACKUP TO URL
🎯 Exam Focus

SQL VM storage best practices (heavily tested on DP-300):

  • Separate disks for data, log, and tempdb — never put them on the same disk
  • TempDB on local SSD (D: drive) — fastest I/O, zero cost, but ephemeral (lost on VM restart)
  • Premium SSD P30+ for data/log — minimum 5000 IOPS
  • Enable Read Caching on data disks, disable caching on log disks
  • Use Storage Spaces to stripe multiple disks for higher IOPS/throughput
⚠️ Watch Out

Common exam trap: "You need full SQL Server compatibility" → NOT always VM! MI offers ~99% compatibility. VM is only needed for the ~1% of features MI doesn't support (FILESTREAM, MSDTC, FCI, third-party OS software).


Storage Architecture — The Complete Comparison

This is the most important architecture difference between the three deployment options. Understanding storage = understanding performance, cost, and HA behavior.

Side-by-Side Architecture

Storage Architecture Comparison: VM vs MI vs SQL DB

Detailed Storage Comparison

AspectSQL Server on VMSQL Managed InstanceAzure SQL Database
Storage typeAzure Managed Disks (you choose)Azure Premium Storage (GP) or Local SSD (BC)Remote storage (GP) or Local SSD (BC/HS)
Max sizeUnlimited (add disks)16 TB4 TB (GP/BC), 100 TB (Hyperscale)
IOPS controlFull — pick disk SKU, count, stripeLimited — tied to tier/vCoresLimited — tied to tier/vCores
Data disk IOPS160–160,000+ (Ultra Disk)GP: ~500-7,500 / BC: ~30K-400K+GP: ~500-7,500 / BC: ~30K-400K+
Latency~1-2ms (Premium SSD)GP: ~5-10ms / BC: ~1-2msGP: ~5-10ms / BC: ~1-2ms
TempDBLocal SSD (D: drive) — YOU configureManaged — scales with vCoresManaged — scales with compute
Storage scalingAdd/resize disks (may need restart)Grow online (no downtime)Grow online (no downtime, GP/HS)
Backup storageYou manage (Blob, disk, URL)Automated — Azure Premium Storage + LRS/GRSAutomated — Azure Blob + LRS/ZRS/GRS
Read cachingYou configure per disk (Host Caching)Managed by AzureManaged by Azure
Disk stripingStorage Spaces (you configure)Managed by AzureManaged by Azure
Encryption at restSSE + optional ADE (BitLocker)TDE (always on)TDE (always on)

General Purpose Storage Architecture (MI & SQL DB)

💻
Compute Node
Stateless — replaceable
SQL Server Engine
RBPEX Cache
Local SSD buffer
Hot data pages cached
Near-BC performance if working set fits
🗄️
Azure Premium Storage
Remote, durable
Data + Log + TempDB files
Latency: ~5-10ms
Failover: ~30s (new node attaches)

How it works:

  1. Compute node is stateless — it can be replaced without data loss
  2. RBPEX (local SSD cache) keeps hot pages — improves read latency
  3. Remote Premium Storage holds all data — durable even if compute dies
  4. Failover: Azure provisions new compute, attaches to same storage (~30 seconds)
🎯 Exam Focus

RBPEX is the secret sauce of General Purpose tier. It's a local SSD buffer that caches frequently accessed data pages. If your working set fits in RBPEX, GP performance approaches BC performance. If it doesn't → you see ~5-10ms storage latency.

Business Critical Storage Architecture (MI & SQL DB)

4-Node Always On AG (Local NVMe SSD)
👑
Primary Replica
Read-Write
Local NVMe SSD
All writes go here
🔄
Secondary 1
Sync Commit
Local NVMe SSD
Full data copy
🔄
Secondary 2
Sync Commit
Local NVMe SSD
Full data copy
📚
Secondary 3
Read-Only Replica
Local NVMe SSD
ApplicationIntent=ReadOnly

Key facts: Failover ~5-10 sec | SLA 99.995% (zone-redundant) | 1 free read replica | In-Memory OLTP supported

How it works:

  1. 4 replicas, each with its own local NVMe SSD (full data copy)
  2. All writes go to primary → synchronously committed to all 3 secondaries
  3. Failover: promote a secondary (~5-10 seconds) — data already local
  4. One free read-only replica — use ApplicationIntent=ReadOnly

Hyperscale Storage Architecture (SQL DB Only)

💻
Primary Compute
+ HA Replicas (up to 4)
+ Named Replicas (up to 30)
Independent compute scale
📝
Log Service
Fast, persistent
Write-ahead logging
Feeds page servers + HA replicas
🗃️
Page Servers
Each caches portion of DB
Local SSD + memory
Serve read requests
☁️
Azure Blob Storage
Ultimate data store
Up to 100 TB
Near-instant backups

How it works:

  1. Page Servers each cache a portion of the database in memory + local SSD
  2. Log Service handles write-ahead logging (fast, persistent)
  3. Azure Blob is the ultimate durable store — holds the complete database
  4. Backups are near-instant (snapshot-based, regardless of DB size)
  5. Named Replicas can have different compute sizes — perfect for isolating workloads
🎯 Exam Focus

Hyperscale is the only tier that:

  • Supports databases > 4 TB (up to 100 TB)
  • Has near-instant backups regardless of size
  • Supports Named Replicas (independent compute scale)
  • Can reverse-migrate back to General Purpose (if ≤ 1 TB) If the exam mentions a 10+ TB database → Hyperscale is the answer.

Storage Decision Quick Reference

QuestionAnswerRecommendation
Need full disk control?YesSQL VM — Premium SSD + Ultra Disk
Need < 2ms latency or read replicas?YesBusiness Critical — Local NVMe SSD, 4-node AG
Database > 4 TB?YesHyperscale — Page Servers + Blob, up to 100 TB
None of the aboveDefaultGeneral Purpose — Remote storage + RBPEX cache, best price/perf

SQL VM Disk Configuration Cheat Sheet

Disk RoleRecommended SKUCachingIOPS ExampleNotes
OSPremium SSD P6 (64 GB)Read/Write240Default, no tuning needed
Data (.mdf)Premium SSD P30+ or UltraRead-Only5,000-160,000Stripe multiple for higher IOPS
Log (.ldf)Premium SSD P20+ or UltraNone2,300+Sequential writes — caching hurts
TempDBLocal SSD (D: drive)N/AVery highFree, ephemeral, lost on restart
BackupStandard SSD or BlobNoneN/ACost-efficient, URL backup to Blob preferred
🏢 Real-World DBA Note

Oracle DBA parallel: Think of this as Oracle ASM disk groups but simpler. Data disks = +DATA, Log disks = +REDO, TempDB = +TEMP on local flash. The key difference: Azure handles redundancy at the storage layer (triple replication) — you don't need ASM mirroring.

Elastic Pools — The Multi-Tenant Architecture

Without PoolWith Elastic Pool
DB 150 DTU (peak 2pm)Shares pool
DB 250 DTU (peak 6pm)Shares pool
DB 350 DTU (peak 10am)Shares pool
Total cost150 DTU (3 x 50)80 eDTU (peaks don't overlap)
Savings~47% less

When to use: Databases with spiky, unpredictable, non-overlapping usage patterns. Rule of thumb: Pool makes sense when 1.5x eDTUs × count < sum of individual DTUs.

🎯 Exam Focus

Elastic Pools support both DTU and vCore models. They're available for Azure SQL Database only — NOT for Managed Instance. MI itself is a single-instance concept (no pooling).


Flashcards

What are the 3 Azure SQL deployment options?
Click to reveal answer
Azure SQL Database (PaaS), SQL Managed Instance (PaaS), SQL Server on Azure VMs (IaaS)
1 / 13

Quiz

Q1/4
0 correct
Which Azure SQL deployment option provides near 100% SQL Server compatibility with PaaS management?