SQL Database Concepts
Overview
Azure SQL Database is a fully managed relational database service built on Microsoft SQL Server. It provides built‑in high availability, automatic backups, scaling, and security features, allowing developers to focus on application logic.
Architecture
The service is composed of logical databases hosted on a set of elastic pools or dedicated single databases. Under the hood, each database runs on a collection of managed compute nodes called vCores or DTUs.
| Component | Description |
|---|---|
| Compute Layer | VMs, vCores, or DTU‑based resources that execute queries. |
| Storage Layer | Automatically managed storage with geo‑redundant backups. |
| Networking | Private endpoints, firewall rules, and virtual network integration. |
Security
Azure SQL Database implements defense‑in‑depth security:
- Transparent Data Encryption (TDE)
- Always Encrypted
- Column‑level encryption
- Advanced Threat Protection
- Managed Identity integration
-- Enable Transparent Data Encryption
ALTER DATABASE CURRENT SET ENCRYPTION ON;
Scalability & Performance
Scale compute resources up or down without downtime using the az sql db CLI or the Azure portal.
az sql db update \
--resource-group MyResourceGroup \
--server myserver \
--name mydatabase \
--service-objective S3
Use elastic pools to share resources across many databases and reduce cost.
Monitoring & Management
Built‑in monitoring tools include:
- Azure Monitor metrics
- Query Performance Insights
- Automatic tuning
-- Find top resource‑consuming queries
SELECT TOP 10
total_worker_time/1000 AS CPU_ms,
total_elapsed_time/1000 AS Duration_ms,
execution_count,
query_hash,
SUBSTRING(txt.text, (qs.statement_start_offset/2)+1,
((CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(txt.text)
ELSE qs.statement_end_offset END
- qs.statement_start_offset)/2)+1) AS query_text
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS txt
ORDER BY CPU_ms DESC;
Pricing & Billing
Billing is based on the chosen compute tier (vCore or DTU) and the amount of storage used. Use the pricing calculator to estimate costs.
FAQ
- Can I migrate an on‑premises SQL Server to Azure SQL Database?
- Yes, using Azure Database Migration Service or the Data Migration Assistant.
- What is the SLA for Azure SQL Database?
- 99.99% availability for single databases and 99.995% for elastic pools.