SQL Server on Azure is a fully managed relational database service that lets you run SQL Server with automatic patching, scaling, and built-in high availability.
SQL Server on Azure is Microsoft’s Platform as a Service (PaaS) offering that hosts SQL Server engines in the cloud, relieving you from hardware management, backups, and OS patching duties.
Automatic backups, point-in-time restore, built-in high availability, elastic scaling, and pay-as-you-go pricing remove CapEx and maintenance overhead.
Use Azure CLI or the Portal. Azure CLI keeps deployments repeatable and scriptable. Create a logical server, then create a database on it.
1. az group create
for a resource group.
2. az sql server create
to define the server name, admin user, and region.
3. az sql db create
to spin up the first database.
Open the server-level firewall (az sql server firewall-rule create
). Then connect with the fully qualified server name (myserver.database.windows.net
) and port 1433 using TLS.
Server=tcp:myserver.database.windows.net,1433;Database=shop_db;User ID=galaxy_admin;Password=<Pwd>;Encrypt=true;TrustServerCertificate=false;
Once connected, you use the same T-SQL syntax you’d run on-premise. The engine version is always the latest stable build.
SELECT c.name, o.id, o.total_amountFROM Customers cJOIN Orders o ON o.customer_id = c.idWHERE o.total_amount > 500 AND o.status = 'UNPAID';
Change the --service-objective
(DTU model) or --compute-model
/--tier
(vCore model) on the database. The switch happens online within minutes.
Azure keeps seven days of automatic backups by default. Increase --backup-storage-redundancy
or configure Long-Term Retention (LTR) up to 10 years.
You pay compute (DTUs or vCores), storage, and outbound network traffic. Pause development databases at night to save 40-60%.
1. Use vCore tier for predictable performance.
2. Enable Zone-Redundant configuration for high availability.
3. Restrict firewall to Azure services and your office IPs.
4. Use Azure AD authentication instead of SQL logins.
Firewall forgotten: Connection fails until you add the client IP.
Sizing too small: Slow queries—monitor sys.dm_db_resource_stats
and scale proactively.
Migrate when hardware refresh is due, teams need global access, or you seek built-in DR. Use Data Migration Service for near-zero downtime.
No. Azure SQL Database is a PaaS service; SQL Server on Azure VMs is IaaS where you manage the OS and patches.
Only in the serverless tier. Traditional DTU/vCore tiers bill 24/7.
Transparent Data Encryption (TDE) is on by default. Bring Your Own Key (BYOK) is available via Azure Key Vault.