Skip to main content
schedule · azure

Azure SQL Dev/Test Could Use Serverless Tier

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

General Purpose vCore SQL databases averaging under 10% CPU, or carrying dev/test names, are candidates for the serverless tier with auto-pause. Savings apply the measured off-hours idle fraction to the compute share of the bill (0.70 of cost, since storage bills through pauses); absent schedule data means abstain.

Signal and threshold

How ZopNight evaluates Azure SQL Dev/Test Could Use Serverless Tier.
Field Value
Rule IDsRC-1335
Categoryschedule
Severitymedium
Metricnone — pure configuration read
Sourcesql_serverless.go

Why vCore databases report CPU, not DTU

  • Metrics path: keyed uid:SQLCpuPercent avg < 10% (intermittent usage) works for any DB, not just dev/test. Name path: dev/test naming when metrics absent. Re-keyed from DTUPercentage to SQLCpuPercent (audit 2026-07-01): the rule hard-gates to GP_ vCore SKUs only (see the GP-only gate below), and vCore databases report utilization under SQLCpuPercent in Azure Monitor, while DTUPercentage is a DTU-purchasing-model-only meter never populated for a vCore database, so reading it made the metrics path permanently unreachable for the only SKU family the rule ever emits for.
  • Skip if already serverless (tier=Serverless tag or S SKU) or paused.
  • GP-only gate (audit 2026-06-26): serverless is a vCore General Purpose-only tier, so the rule requires a GP_ SKU and exclude DTU-model tiers (Basic/Standard/Premium) and GP_SYSTEM system DBs; fail-closed on unknown SKU.
  • ScheduleAware (SetScheduleData) supplies the measured off-hours idle fraction, the only savings source.

Auto-pause only refunds the compute share

concrete-or-abstain (cost-driven schedule). The serverless saving comes from auto-pausing idle hours, so the dollar figure is the measured off-hours idle fraction of the compute-only portion of the provisioned bill: savings = cost × azureComputeCostFraction (0.70) × sd.IdlePercentage from the aggregator’s heatmap-derived ScheduleData (RC-093 path); storage keeps billing during auto-pause, so the full bill is discounted to the ~0.70 compute share; the rec carries SuggestedSchedule + ScheduleHeatmap. The rule abstains (returns nil) when schedule data is absent or IdlePercentage ≤ 0, or when pricing is missing or non-positive. There is never a $0 advisory rec and never a fabricated fraction (the prior azureRightsizingSavingsFraction 0.30-of-provisioned-cost flat estimate is removed, user directive 2026-06-27).

Switching the tier in the portal

  1. Go to Azure Portal → SQL Database → Compute + storage

The CPU meter behind the 10% gate

SQLCpuPercent (30d)

See it fire on your bill.

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

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

417 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·