Azure SQL Dev/Test Could Use Serverless Tier
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
| Field | Value |
|---|---|
| Rule IDs | RC-1335 |
| Category | schedule |
| Severity | medium |
| Metric | none — pure configuration read |
| Source | sql_serverless.go |
Where it applies
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
- Go to Azure Portal → SQL Database → Compute + storage
The CPU meter behind the 10% gate
SQLCpuPercent (30d)