Skip to main content
schedule · azure

General Purpose vCore Azure SQL databases with long idle stretches that could auto-pause on serverless

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

ZopNight flags a provisioned General Purpose vCore Azure SQL Database (a `GP_` service objective) when its CPU averages under 10% over 30 days, or its name marks it as dev or test and CPU data is missing. The saving is the compute share of its bill multiplied by the idle hours ZopNight measured, which serverless auto-pause would stop charging for.

Signal and threshold

How ZopNight evaluates General Purpose vCore Azure SQL databases with long idle stretches that could auto-pause on serverless.
Field Value
Rule IDsRC-1335
Categoryschedule
Severitymedium
MetricCPU percentage
Thresholdavg CPU < 10% on a provisioned GP_ database
Evaluation window30d
SourceZopNight
Permissions usedMicrosoft.Sql/servers/databases/read · Microsoft.Insights/Metrics/Read

Provisioned compute billed through hours with no queries

A provisioned vCore database pays for its vCores every hour. The serverless tier overview describes the alternative for single databases: compute scales with demand and is billed per second, and after a configurable auto-pause delay of inactivity the database pauses. While paused the compute cost is zero and only storage is billed. Microsoft notes auto-pause and auto-resume are supported only in the General Purpose tier.

Development, reporting and internal-tool databases often go silent every night and weekend. On provisioned compute those hours cost the same as a busy Monday morning.

Finding General Purpose databases with low CPU

Terminal window
az sql db list --resource-group my-rg --server my-server \
--query "[?starts_with(currentServiceObjectiveName, 'GP_')].{name:name, objective:currentServiceObjectiveName}" \
-o table
az monitor metrics list --resource <database-resource-id> \
--metric cpu_percent --aggregation Average Maximum --interval PT1H --offset 30d

Service objectives with GP_S_ in the name are already serverless.

What qualifies a database for serverless

  1. The service objective is a General Purpose vCore one starting with GP_. DTU tiers (Basic, Standard, Premium) and system databases are excluded, and an unknown objective is not assumed.
  2. The database is not already serverless and is not paused.
  3. Either CPU percentage averages below 10% over 30 days, or, when no CPU data is available, the name marks it as dev, test, qa, staging, sandbox or demo.
  4. ZopNight has measured idle hours for the database in its weekly activity heatmap, and the database has a monthly cost.

Databases kept on provisioned compute

Business Critical and Hyperscale databases are outside scope, because auto-pause is a General Purpose feature. Without measured idle time or cost data there is no recommendation; ZopNight does not assume a flat share of the bill.

Pausing compute, not storage

Terminal window
monthly saving = database monthly cost x 0.70 x measured idle fraction

Storage keeps billing while a serverless database is paused, so only the compute part of the bill can shrink. ZopNight treats 70% of the provisioned bill as compute, an assumed split rather than a measured one, and applies the idle fraction to that share. The recommendation carries the heatmap and a suggested schedule so you can see which hours drive the figure.

Switching the database to serverless

  1. Check that the application retries connections, since the first login after a pause waits for the database to resume.
  2. Choose an auto-pause delay; Microsoft’s minimum is 15 minutes.
  3. Change the compute model: az sql db update --resource-group my-rg --server my-server --name my-db --compute-model Serverless --auto-pause-delay 60.
  4. Watch the database’s paused hours and billed vCore seconds over the next billing period.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·