The Azure SQL Family
The three ways to run SQL Server workloads on Azure, the purchasing models and service tiers, and how to choose the right option.
The Azure SQL family
Azure SQL is the family of Azure services for Microsoft SQL Server, and it offers three main ways to run SQL Server workloads. They range from a fully managed database, where Microsoft handles almost everything, to a virtual machine, where you control everything. Choosing the right one is the first decision an Azure DBA makes.
All three run Microsoft's SQL Server engine, so they speak the same dialect, T-SQL, and use the same core skills. What changes is how much of the work is yours.
The three deployment models
The three options split the work between you and Microsoft in different ways:
- Azure SQL Database (PaaS)
- A fully managed database. Microsoft handles patching, upgrades, backups, and high availability, with an uptime commitment of 99.99%, or up to 99.995% for zone-redundant databases in the Business Critical tier. It offers serverless compute that scales automatically and can pause when idle, and the Hyperscale tier for very large databases that need to scale quickly. Each database stands on its own, so some instance-level SQL Server features, such as SQL Server Agent jobs and cross-database queries, aren't available.
- Azure SQL Managed Instance (PaaS)
- A managed SQL Server instance, built for moving existing on-premises SQL Server databases to the cloud with few changes, often called lift and shift. It has near-100% compatibility with SQL Server, including SQL Server Agent, cross-database queries, and Database Mail, and it runs inside your own virtual network (VNet) for network isolation.
- SQL Server on Azure Virtual Machines (IaaS)
- Full SQL Server installed on a Windows or Linux virtual machine. You get complete control of the operating system and SQL Server, including features and versions the PaaS options don't support. In return, you're responsible for patching, backups, and high availability and disaster recovery, although the SQL IaaS Agent extension can automate some of this work.
| Azure SQL Database | Azure SQL Managed Instance | SQL Server on Azure VMs | |
|---|---|---|---|
| Service model | PaaS | PaaS | IaaS |
| What you manage | A database | An instance with many databases | The whole server |
| SQL Server compatibility | High, but database-scoped | Near 100% | 100% |
| Operating system access | No | No | Yes |
| Patching and backups | Automatic | Automatic | Your job, with optional automation |
| High availability | Built in | Built in | You configure it, for example with Always On availability groups |
| Best for | New cloud applications and modern apps | Moving existing SQL Server instances | Apps that need full control or unsupported features |
Purchasing models and service tiers
For Azure SQL Database, you choose how to buy capacity:
- DTU-based model
- A simple bundle of CPU, memory, and I/O, measured in database transaction units (DTUs), sold in the Basic, Standard, and Premium tiers. Easy to start with, but you can't tune CPU and storage separately.
- vCore-based model
- You choose the number of virtual cores (vCores), with memory and storage sized separately. It's more flexible, maps easily to on-premises servers, and supports cost savings such as reserved capacity and the Azure Hybrid Benefit, which lets you reuse SQL Server licenses you already own. Microsoft recommends vCore for most new workloads, and it's the only model for Managed Instance.
The vCore model has three service tiers:
| Tier | Designed for | Good to know |
|---|---|---|
| General Purpose | Most business workloads | Balanced price and performance, with data on remote storage. Supports serverless compute. |
| Business Critical | Workloads that need the fastest storage and the most resilience | Local SSD storage, several replicas kept in sync, and a free readable secondary for reports. |
| Hyperscale | Very large databases, and workloads that grow quickly | Storage grows automatically to many terabytes, compute scales quickly, and backups are near-instant. Azure SQL Database only. |
Within a tier, compute can be provisioned, a fixed size billed by the hour, or serverless, which scales automatically and bills per second of use. For many small databases with unpredictable loads, an elastic pool lets them share one set of resources instead of each paying for its own peak.
Choosing the right option
Microsoft generally recommends starting from the most managed option that meets your needs, Azure SQL Database, and moving down the list only when something requires it. The more Microsoft manages, the more of your time goes to design, performance, and security instead of routine maintenance.
Creating a database
You can create Azure SQL resources in the Azure portal, but DBAs usually script them, so every database is created the same way. With the Azure command-line interface (CLI), creating a logical server and a serverless database looks like this:
# a resource group in East US
$ az group create --name rg-sales --location eastus
# a logical server, with an administrator login
$ az sql server create --name kofi-sql-01 --resource-group rg-sales \
--location eastus --admin-user sqladmin --admin-password "<strong-password>"
# a General Purpose, serverless database that pauses after an hour idle
$ az sql db create --name salesdb --server kofi-sql-01 --resource-group rg-sales \
--edition GeneralPurpose --family Gen5 --capacity 2 \
--compute-model Serverless --auto-pause-delay 60
In practice, these commands usually become infrastructure as code, such as a Bicep or Terraform template, kept in Git and reviewed like any other change.
In practice: migrating a SQL Server estate
Kofi's company has 40 on-premises SQL Server databases to move to Azure. An assessment with Azure Migrate shows which features each one uses, and they fall into three groups:
| Databases | What they use | Destination |
|---|---|---|
| 28 small application databases | Nothing outside the database itself | Azure SQL Database, most in elastic pools to share capacity |
| 9 databases | SQL Server Agent jobs, queries across databases, and Database Mail | Azure SQL Managed Instance, which supports all three |
| 3 databases for a vendor product | An old SQL Server version the vendor requires, and an agent installed on the server | SQL Server on Azure Virtual Machines |
Most of the estate lands on the most managed option. Only the databases with a real reason, a feature or a vendor requirement, go further down the list, which is exactly the "start from the most managed" rule in action.
Key takeaways
- Azure SQL is a family of three options for SQL Server, all using the same engine and T-SQL.
- Azure SQL Database is fully managed and database-scoped; Managed Instance is a managed SQL Server instance for lift and shift; SQL Server on Azure VMs gives full control and full responsibility.
- The vCore model, with General Purpose, Business Critical, and Hyperscale tiers, is the usual choice; DTUs are a simpler bundle.
- Compute can be provisioned or serverless, and elastic pools let many small databases share resources.
- Start with the most managed option that meets your needs, and script your deployments.