SQL Server Tips

Comparison of SQL on Virtual Machine (VM) vs Azure Managed Instance (MI) vs Azure SQL Database (DB)

Updated
8 min read
Written by
Mark Varnas

The purpose of this document is to list the limitations of Azure Managed Instance and Database so we can compare them with the old-fashioned SQL on VM option.

  1. Deployment and Management
  2. Maintenance and Operations
  3. Scalability and Performance
  4. Features and Capabilities
  5. Network and Security
  6. High Availability and Disaster Recovery
  7. Pricing and Licensing
  8. Azure SQL Database – DTU explanation
  9. Some useful URLs

Deployment and Management

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
DeploymentFull control over SQL Server installed on a VMFully managed service, SQL Server instance-likeFully managed, database-as-a-service (DBaaS)
ManagementSelf-managed (OS, patches, backups)Automated management (backups, patches, upgrades)Fully automated (backups, patches, high availability)
CustomizationFull control over SQL Server and OS settingsLimited customization, but most instance-level configurationsLeast customizable, database-level settings only
Use CaseFull flexibility for custom SQL environmentsIdeal for migrating existing SQL workloads with minimal refactoringBest for cloud-native applications or lightweight workloads
Red9 supportProactive Red9 monitoring and tuning (including auto-tuning and auto-fix issues), full support and maintenanceLimited Red9 monitoring, more complex tuning, not supported auto-tuning or auto-issue fixing.No Red9 monitoring, only manual tuning and maintenance.

Maintenance and Operations

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
Maintenance ResponsibilityUser manages everything (patching, backups)Managed by Azure (backups, high availability, patches)Fully managed by Azure
Operational ControlFull control over the OS and SQL ServerControl over SQL instance, but limited to supported featuresLimited to database-level operations
BackupsRed9 backup automation, point-in-time restoreAzure automated backups, point-in-time restoreAzure automated backups, point-in-time restore

Scalability and Performance

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
ScalabilityManual scaling by changing VM sizeBuilt-in scalability through service tiersEasy scaling (elastic pools, serverless options available)
PerformancePerformance tied to VM size and configurationPerformance optimized via built-in features (tiers)Performance tied to service tier (vCore or DTU model)
ElasticityCustom configurations based on VM and SQL ServerLimited to available instance sizesOffers elasticity through elastic pools and serverless options

Features and Capabilities

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
SQL Server VersionAny version you install (2012, 2014, 2016, etc.)Built on Enterprise Edition SQL ServerManaged SQL platform, closest to latest SQL Server features
SQL Feature SupportFull support, including SSRS, SSIS, SSASSSIS is available, but no SSRS/SSASNo SSRS/SSAS/SSIS, SQL Agent support directly
Cross-Database QueriesFull supportSupported across databases in the same instanceLimited (possible via elastic queries)
Custom SoftwareFull support (can install any third-party tools)No ability to install custom softwareNo ability to install custom software

Network and Security

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
Network ConfigurationFull control over networking, security groupsVirtual Network (VNet) support with private IPPublic and private endpoints supported, VNet integration via private link
SecurityUser controls security (firewalls, encryption)Built-in security features, managed by AzureBuilt-in security features, managed by Azure
AuthenticationFull control (Windows Authentication, certificates, etc.)Supports Active Directory and SQL AuthenticationSupports Active Directory and SQL Authentication

High Availability and Disaster Recovery

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
High AvailabilitySupports all available options, like Always On Availability Groups, failover clusteringBuilt-in high availability with automatic failoverBuilt-in high availability with automatic failover
Disaster RecoverySupports all available options, like Always On Availability Groups, Log Shipping, ReplicationBuilt-in disaster recovery optionsAutomated DR with geo-replication options

Pricing and Licensing

FeatureSQL Server on Azure VMAzure SQL Managed Instance (MI)Azure SQL Database
PricingPay for the VM size, SQL Server license, and storage separatelyPay for the instance based on the service tier (vCores)Pay for the database (vCore or DTU-based)
LicensingSQL Server license (BYOL or included in Azure cost)SQL Server license included in the costSQL Server license included in the cost
Price comparison (8vCore + 4TB Data size + Backup), Single Instance$1,890.00 (SQL Standard, E8bdsv_5, Premium SSD v2 – 12k IOPS + 400 MB/s, max IOPS 80k + 1200 MB/s)$2,533.87 (Next Generation General Purpose, max IOPS 12k + 400MB/s, max TempDB size 192GB)
$4,820.70 (Business Critical, database size limit 1TB)
$17,492.40 (Business Critical, 32vCore, database size limit 4TB)
$2,303.72 (General purpose, Per each database, database size limit of 2TB, max IOPS 2,5k + 36 MB/s)
$5,555.40 (General purpose, Per each database, 24 vCore and database size limit of 4TB, max IOPS 7,6k + 50 MB/s)
$3,682.27 (Hyperscale, per each database, TempDB max size 256GB)
Price comparison (8vCore + 4TB Data size + Backup + DR/HA)$2,769.01 (SQL Standard + DR, E8bdsv_5, Premium SSD v2 – 12k IOPS + 400 MB/s, max IOPS 80k + 1200 MB/s)
$3,628.22 (SQL Standard + DR/HA, E8bdsv_5, Premium SSD v2 – 12k IOPS + 400 MB/s, max IOPS 80k + 1200 MB/s)
$3,479.25 (Next Generation General Purpose, max IOPS 12k + 400MB/s, max TempDB size 192GB)$4,023.65 (General purpose, Per each database, database size limit of 2TB)
$9,330.69 (General purpose, Per each database, 24 vCore and database size limit of 4TB)
$4,749.00 (Hyperscale, per each database, TempDB max size 256GB)

Azure SQL Database – DTU explanation

DTU (Database Transaction Unit) is a performance measurement used by Azure SQL Database to describe the relative capacity of a database in terms of CPU, memory, reads, and writes. DTUs provide a simplified way to select a performance tier based on the workload requirements of your database, without having to configure and balance individual resources like CPU or IOPS manually.

Components of a DTU

A DTU represents a blended measure of these three main resources:

  1. CPU: The processing power required for queries and other operations.
  2. Memory: The amount of RAM available for query execution, caching, and temporary storage.
  3. Disk I/O:
    • Reads: The amount of data read from storage (disk).
    • Writes: The amount of data written to storage (disk).

Each DTU tier is designed to offer a balanced amount of these resources. For example, as you move from a lower DTU tier (e.g., Basic) to a higher DTU tier (e.g., Standard or Premium), you get more CPU, memory, and I/O capacity.

How DTU Works

  • Performance Tiers: Azure SQL Database offers multiple performance tiers based on DTUs:
    • Basic: Suitable for lightweight workloads like small databases or development environments.
    • Standard (S0, S1, S2, etc.): Designed for general-purpose workloads with moderate performance requirements.
    • Premium (P1, P2, etc.): Meant for high-performance workloads that require high transaction rates and low latency, especially for business-critical applications.
  • Resource Scaling: As you choose higher DTU tiers, you get more resources:
    • Higher CPU capacity for faster query processing.
    • More memory for caching data and query execution.
    • Higher IOPS (Input/Output operations per second) for faster reads/writes to storage.
  • Simplified Sizing: Instead of managing individual resources (like CPU, memory, or I/O) directly, you select a DTU tier that meets your performance needs. This simplifies the process of sizing and scaling the database.

When to Use DTUs vs. vCores

While DTUs are simple, Azure also offers a vCore-based pricing model, which allows more granular control over CPU and memory resources. DTU-based pricing is generally better for:

  • Small to medium-sized databases with relatively simple performance needs.
  • Users who want simplicity in resource management without dealing with specifics of CPU cores and memory allocation.

In contrast, the vCore model is better suited for:

  • Large databases or enterprise applications with complex or predictable resource requirements.
  • Organizations that prefer to manage and configure CPU and memory separately, providing more control and flexibility.

Some useful URLs

Article by
Mark Varnas
Founder | CEO | SQL Veteran
Hey, I'm Mark, one of the guys behind Red9. I make a living performance tuning SQL Servers and making them more stable.

Leave a Comment

Managed SQL Server services, consulting, and emergency support from expert DBAs to improve performance, predictability, and cost.

Get started with Red9 today.

Contact us

Discover More

SQL Server Health Check SQL Server Migrations & Upgrades SQL Server Performance Tuning SQL Server Security SQL Server Tips

Discover what clients are saying about Red9

Red9 has incredible expertise both in SQL migration and performance tuning.

The biggest benefit has been performance gains and tuning associated with migrating to AWS and a newer version of SQL Server with Always On clustering. Red9 was integral to this process. The deep knowledge of MSSQL and combined experience of Red9 have been a huge asset during a difficult migration. Red9 found inefficient indexes and performance bottlenecks that improved latency by over 400%.

Rich Staats 5 stars
Rich Staats
Cloud Engineer
MetalToad

Always willing to go an extra mile

Working with Red9 DBAs has been a pleasure. They are great team players and have an expert knowledge of SQL Server database administration. And are always willing to go the extra mile to get the project done.
5 stars
Evelyn A.
Sr. Database Administrator

Boosts server health and efficiency for enhanced customer satisfaction

Since adding Red9 to the reporting and DataWarehousing team, Red9 has done a good job coming up to speed on our environments and helping ensure we continue to meet our customer's needs. Red9 has taken ownership of our servers ensuring they remain healthy by monitoring and tuning inefficient queries.
5 stars
Andrew F.
Datawarehousing Manager
See more testimonials