Cloud service · Azure · Updated

SQL Server on Azure Virtual Machines - SQL Server on Azure Virtual Machines runs SQL Server on Azure-hosted Windows or Linux virtual machines with administrative control over the database engine and operating system.

In short

This infrastructure-as-a-service option supports migrating existing SQL Server applications, building customized database environments, and extending on-premises deployments into Azure. Azure provides the underlying infrastructure, while engineers remain responsible for database configuration, guest operating system maintenance, backups, security, and availability architecture.

Cloud Services Hub →

9 key features of SQL Server on Azure Virtual Machines

01
Operating system and instance control

Administrators can configure the guest operating system, install supporting software, manage SQL Server services, and change instance-level settings. This supports applications with dependencies that cannot be accommodated by a managed database service.

02
Windows and Linux deployment options

Run supported SQL Server versions and editions on supported Windows Server or Linux configurations. Validate feature requirements against the selected operating system and edition because SQL Server capabilities and Azure management features are not identical across them.

03
SQL IaaS Agent extension

Register SQL Server VMs to expose SQL-specific management and licensing settings in Azure. Supported Windows configurations can use capabilities such as automated backup and patch management; registration itself has no additional charge.

04
Configurable compute and storage

Select VM sizes and managed disk configurations to match CPU, memory, IOPS, and throughput requirements. Check both VM-level and disk-level limits before increasing disk performance, since either can constrain the workload.

05
SQL-aware backup options

Use supported Azure Backup protection, native SQL Server backups to Blob Storage, or applicable automated backup functionality. Configure retention and log backup frequency around recovery objectives, and perform restore tests rather than relying only on successful backup status.

06
Customer-designed availability and disaster recovery

Build supported Always On availability group, failover cluster instance, or log shipping architectures according to application requirements. Replicas, clustering, networking, monitoring, and failover procedures must be explicitly configured and maintained.

07
Maintenance scheduling

Control when operating system and SQL Server updates are applied, using supported update tooling and maintenance windows. In highly available deployments, coordinate updates across replicas and verify failover readiness before servicing.

08
Performance diagnostics

Combine SQL Server diagnostics with Azure VM and disk metrics to investigate slow queries and infrastructure constraints. Portal I/O Analysis helps identify VM or disk throttling so that storage changes address the actual bottleneck.

09
Flexible SQL Server licensing

Use pay-as-you-go SQL Server licensing or apply eligible licenses through Azure Hybrid Benefit. Supported licensing-model changes can be made without restarting the VM or SQL Server service, but customers must maintain licensing eligibility and compliance.

Where SQL Server on Azure Virtual Machines is used

  1. 01
    Lift-and-shift application migration

    Move an existing SQL Server workload to Azure while retaining instance-level behavior and operating system dependencies. Assess performance requirements and migrate databases together with required logins, jobs, linked servers, and other instance objects.

  2. 02
    Applications requiring custom server configuration

    Host vendor applications that require administrative access, local software, specific SQL Server settings, or tightly controlled update schedules. Confirm vendor support for the chosen Azure VM, operating system, and SQL Server combination.

  3. 03
    Hybrid disaster recovery

    Use Azure-hosted SQL Server as a recovery destination for an existing environment through a supported replication or log shipping design. Provide private connectivity and test application reconnection, failover, and failback procedures.

  4. 04
    Development and compatibility testing

    Create isolated environments for application testing, SQL Server upgrades, and migration rehearsals. Use Developer edition only for permitted nonproduction workloads, and deallocate idle VMs when persistent availability is unnecessary.

  5. 05
    Customized transactional and reporting workloads

    Run workloads that need deliberate control over memory allocation, storage layout, instance configuration, and maintenance jobs. Separate competing workloads or use appropriately licensed readable replicas where supported to reduce interference with transactional processing.

How SQL Server on Azure Virtual Machines is priced

Pay-as-you-go SQL Server licensing

Pay for the Azure VM infrastructure and a metered SQL Server software license, with costs affected by edition and licensed compute configuration. Managed disks, backup storage, networking, and additional services are charged separately as applicable.

Azure Hybrid Benefit

Apply eligible SQL Server licenses with qualifying Software Assurance or subscription rights instead of paying the SQL Server license-included rate. Compute, storage, backup, and applicable networking charges remain; Windows Server licensing is a separate consideration.

Compute reservations and savings plans

Eligible VM compute can use Azure Reservations or an Azure savings plan for compute in exchange for a usage commitment. These discounts do not replace SQL Server licensing or generally discount the separate SQL Server software meter, so model infrastructure and licensing costs independently.

Developer and Express editions

Developer edition has no SQL Server license charge for permitted development and testing, while Express has no SQL Server license charge but includes edition-specific resource and feature limits. Azure compute, storage, and other consumed resources still incur charges.

Services SQL Server on Azure Virtual Machines works with

A common production architecture places application servers and SQL Server VMs on private Azure Virtual Network subnets, with network security groups allowing only required traffic. On-premises applications connect through VPN or ExpressRoute with private DNS resolution. Administration should use a controlled access path rather than publicly exposing database or remote administration ports.

Recovery designs typically use Azure Backup for supported SQL Server workloads or native SQL Server backups to Azure Blob Storage. Select and document a coordinated backup strategy, including transaction log handling, retention, encryption, and restore ownership. Availability groups can reduce service interruption, but they do not replace independent backups or protection against accidental data changes.

Operational architectures combine Azure Monitor infrastructure telemetry with SQL Server diagnostics to distinguish query regressions from VM saturation and storage throttling. Defender for Cloud adds applicable security assessments and alerts, while Key Vault can support external encryption key management in supported configurations. Deploy these integrations with explicit permissions, private connectivity where supported, and tested recovery procedures; adding an integration does not transfer responsibility for database operations to Azure.

Azure Virtual Network

Place SQL Server VMs in private subnets and restrict database traffic with network security groups. For example, allow the application subnet to reach the configured SQL Server TCP port while denying direct internet access. Hybrid clients can reach the private address through appropriately configured VPN or ExpressRoute connectivity and DNS.

Azure Backup

Use SQL Server workload backup in Azure VMs for supported Windows configurations to manage database-aware protection through a Recovery Services vault. For example, configure full and transaction log backups to meet a transactional application's recovery point objective. Validate support for the SQL Server topology and regularly test point-in-time restoration.

Azure Blob Storage

SQL Server can write native backups to Azure Blob Storage using supported BACKUP TO URL configurations. For example, transfer a full backup and subsequent log backups to Blob Storage before restoring them onto a migration target VM. Configure authorization, storage network access, and retention deliberately so that backups remain both protected and recoverable.

Azure Monitor

Collect VM metrics and supported guest telemetry to correlate SQL Server symptoms with infrastructure behavior. For example, alert on sustained CPU pressure or disk latency and compare the affected period with Query Store and SQL Server wait statistics. Guest logs and performance counters require the appropriate collection configuration, and ingestion or retention can incur charges.

Azure Key Vault

Supported SQL Server configurations can use the SQL Server Connector for Microsoft Azure Key Vault to integrate external key management through Extensible Key Management. For example, protect a transparent data encryption key hierarchy with a key held in Key Vault. Validate edition and version prerequisites, assign narrowly scoped permissions, and protect key availability because loss of required key access can prevent database recovery or access.

Microsoft Defender for Cloud

Enable the applicable Defender for SQL on machines coverage to add supported vulnerability assessment and threat detection capabilities. For example, use assessment findings to identify excessive permissions or insecure database configurations and route relevant alerts to the security operations team. This is separately configured protection and does not replace SQL Server patching, access controls, or backup.

App Service

A web app can reach SQL Server on an Azure VM through an App Service Hybrid Connection. A Hybrid Connection Manager on a machine that can reach SQL Server forwards traffic to the database's configured TCP port without exposing that port to the internet.

Automation

Azure Automation runbooks can manage the lifecycle of the VM that hosts SQL Server. For example, a scheduled runbook can start a development SQL Server VM in the morning and deallocate it at night.

Azure Advisor

Azure Advisor analyzes utilization of the VM hosting SQL Server and can recommend a smaller VM size when the host is consistently underused.

Azure Analysis Services

Azure Analysis Services can use a SQL Server database on an Azure VM as a tabular model source. A gateway can connect the service to a private SQL Server endpoint for model processing or DirectQuery.

What is SQL Server on Azure Virtual Machines

2 min read

SQL Server on Azure Virtual Machines provides a dedicated SQL Server environment on Azure compute and storage. Unlike Azure SQL Database and Azure SQL Managed Instance, it gives administrators access to the guest operating system and full control over the SQL Server instance. This makes it appropriate for applications that depend on operating system components, particular SQL Server configurations, third-party agents, or features that are not available in managed database services. Supported capabilities depend on the SQL Server version, edition, and operating system.

Deployment requires selecting a region, virtual machine size, operating system, SQL Server edition, storage layout, and licensing model. Windows SQL Server images can simplify provisioning and registration with the SQL IaaS Agent extension. Self-installed instances should also be registered to enable applicable Azure management and licensing capabilities. Registration is free, but feature availability differs between Windows and Linux and across supported configurations. Provisioning an image does not remove the need to check the installed SQL Server build and apply appropriate updates.

Size the environment using measured CPU, memory, storage latency, IOPS, and throughput requirements rather than database size alone. Both the virtual machine and its disks impose performance limits. Separate data and transaction log workloads where appropriate, configure disk caching according to SQL Server guidance, and reserve memory for the operating system. Local temporary storage can host tempdb when the selected VM and configuration support it, but it must not hold persistent user database files. Query Store, SQL Server wait statistics, and Azure infrastructure metrics help distinguish query problems from compute or storage bottlenecks.

A single SQL Server VM does not provide database-level high availability by default. Engineers must design and operate an appropriate solution, such as Always On availability groups or a supported failover cluster instance configuration. Availability zones, network connectivity, quorum, listener configuration, and SQL Server edition restrictions all affect the design. Cross-region disaster recovery requires additional replication or backup arrangements. Define recovery point and recovery time objectives, then test failover and restoration against those objectives.

Protect access with private networking, restrictive network security groups, encrypted client connections, and least-privilege database permissions. Azure resource permissions and SQL Server permissions are separate controls. Configure SQL-aware backups through a supported mechanism such as Azure Backup or native backups to Azure Blob Storage, and regularly validate restoration. Coordinate operating system and SQL Server updates with maintenance windows and any failover topology. Automated management features reduce repetitive work, but responsibility for database integrity, application compatibility, capacity planning, and recovery remains with the operating team.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.