Azure SQL Database

Most applications need a structured way to store and query data — product catalogs, customer records, order histories, and financial transactions all require a relational database. Azure SQL Database is Microsoft's fully managed relational database service built on the industry-standard SQL Server engine, running in the cloud without the overhead of managing physical servers.

What is Azure SQL Database?

Azure SQL Database is a PaaS (Platform as a Service) relational database. Microsoft handles all infrastructure management — hardware, OS patching, software updates, backups, and high availability. The application team only manages the database schema, queries, and data.

It is fully compatible with the on-premises SQL Server engine, so existing SQL applications can migrate to Azure SQL Database with minimal or no code changes.

Azure SQL Family Overview

Microsoft offers several SQL options in Azure. Choosing the right one depends on the use case:

ProductTypeBest For
Azure SQL DatabaseFully managed single database or elastic poolModern cloud-native applications, SaaS apps
Azure SQL Managed InstanceFully managed, near 100% SQL Server compatibilityLift-and-shift migration of on-premises SQL Server with minimal changes
SQL Server on Azure VMsSQL Server installed on a virtual machine (IaaS)Full OS-level control, specific SQL Server versions, all SQL Server features

Azure SQL Database Deployment Options

Single Database

A single isolated database with its own dedicated resources. Each database has its own compute and storage. Best for applications that need predictable performance.

Elastic Pool

Multiple databases share a pool of compute resources (called eDTUs or vCores). This is cost-efficient when multiple databases have unpredictable, varying workloads — while one database spikes, others are idle, and the resources are shared.

Diagram – Single Database vs Elastic Pool

  Single Database:
  ┌───────────┐  ┌───────────┐  ┌───────────┐
  │  DB-App1  │  │  DB-App2  │  │  DB-App3  │
  │ (Own CPU) │  │ (Own CPU) │  │ (Own CPU) │
  └───────────┘  └───────────┘  └───────────┘
  Each database pays for its own dedicated resources.

  Elastic Pool:
  ┌────────────────────────────────────────────┐
  │          Elastic Pool (Shared Resources)   │
  │  ┌────────┐  ┌────────┐  ┌────────┐        │
  │  │ DB-1   │  │ DB-2   │  │ DB-3   │        │
  │  │(Idle)  │  │(Active)│  │(Idle)  │        │
  │  └────────┘  └────────┘  └────────┘        │
  └────────────────────────────────────────────┘
  All databases share one pool — active ones use more,
  idle ones use less. Much cheaper than individual allocation.

Compute Tiers

Azure SQL Database uses two compute models:

DTU Model (Database Transaction Unit)

DTUs are a blended measure of CPU, memory, reads, and writes. Simpler to understand — just pick a size (Basic, Standard, Premium) and Azure handles the rest.

vCore Model (Virtual Core)

vCores give direct control over the number of CPU cores and memory. More transparent and allows using Azure Hybrid Benefit to bring existing SQL Server licenses. Recommended for production workloads.

Service TierModelBest For
BasicDTUDev/test, small applications with light usage
StandardDTUWeb apps and cloud services with moderate I/O
PremiumDTUOLTP apps with high I/O requirements
General PurposevCoreMost business workloads, balanced compute and storage
Business CriticalvCoreHighest performance, in-memory OLTP, high resilience
HyperscalevCoreVery large databases (up to 100 TB), rapid scaling

High Availability in Azure SQL Database

Azure SQL Database includes built-in high availability — no extra configuration is needed. Under the covers, Microsoft uses different strategies depending on the tier:

  • General Purpose: Uses remote storage (Azure Premium Storage). Compute and storage are separated. Failover takes 20–30 seconds.
  • Business Critical: Uses Always On Availability Groups with 3–4 replicas. Failover takes 5–10 seconds. One secondary replica can be used as a read-only endpoint to offload reporting queries.
  • Hyperscale: Uses a distributed storage architecture with multiple page servers and up to 5 high availability replicas.

Backups

Azure SQL Database automatically performs three types of backups:

  • Full backup: Every week, a complete copy of the database is taken.
  • Differential backup: Every 12–24 hours, changes since the last full backup are captured.
  • Transaction log backup: Every 5–10 minutes, changes since the last log backup are captured.

These backups enable Point-in-Time Restore (PITR) — the ability to restore the database to any point within the retention period (7 to 35 days, configurable).

Security Features

Firewall Rules

By default, Azure SQL Database blocks all connections. Firewall rules must be added to allow specific IP addresses or Azure services to connect.

Azure Active Directory Authentication

Instead of SQL usernames and passwords, Azure AD identities (users, groups, managed identities) can be used to authenticate to the database — enabling single sign-on and multi-factor authentication.

Transparent Data Encryption (TDE)

TDE encrypts the database files at rest automatically. The encryption and decryption are completely transparent to the application — no changes are needed in the application code.

Advanced Threat Protection

Azure SQL Database continuously monitors query patterns and alerts on suspicious activity like SQL injection attempts, unusual access locations, or abnormal data extraction patterns.

Connecting to Azure SQL Database

  Connection String Example (ADO.NET):

  Server=tcp:myserver.database.windows.net,1433;
  Initial Catalog=myDatabase;
  Persist Security Info=False;
  User ID=myUsername;
  Password=myPassword;
  MultipleActiveResultSets=False;
  Encrypt=True;
  TrustServerCertificate=False;
  Connection Timeout=30;

Connection Methods

  • SQL Server Management Studio (SSMS): Full-featured GUI tool for managing databases, writing queries, and viewing data.
  • Azure Data Studio: Lightweight, cross-platform tool (Windows, macOS, Linux) for running queries and visualizing results.
  • Azure Portal Query Editor: Browser-based SQL editor built directly into the Azure Portal — no installation required.
  • Application SDKs: Connect from applications using ADO.NET, JDBC, ODBC, or modern ORMs like Entity Framework.

Key Takeaways

  • Azure SQL Database is a fully managed PaaS relational database compatible with SQL Server.
  • Deployment options include Single Database (dedicated resources) and Elastic Pool (shared resources).
  • Pricing models are DTU (simple, bundled) and vCore (transparent, license-friendly).
  • Built-in high availability, automatic backups, and point-in-time restore require no manual configuration.
  • Security includes TDE (encryption at rest), firewall rules, Azure AD authentication, and Advanced Threat Protection.
  • Azure SQL Managed Instance provides near 100% SQL Server compatibility for lift-and-shift migrations.

Leave a Comment