Skip to main content
idle · azure

Idle Azure SQL Database

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

Idle detection for Azure SQL databases requires DTU utilization below 5% over 30 days plus a present SQLConnectionSuccessful series showing no connections. Serverless databases get auto-pause savings from the measured idle fraction; provisioned tiers get a one-tier DTU step-down priced from real rate deltas, abstaining when neither quantifies.

Signal and threshold

How ZopNight evaluates Idle Azure SQL Database.
Field Value
Rule IDsRC-203
Categoryidle
Severitymedium
Metricnone — pure configuration read
Sourceidle_sql.go

Low DTU plus no successful connections

  • MetricsAware: DTUPercentage over 30 days (low-DTU gate) and SQLConnectionSuccessful (required; absent => abstain; >0 => in use, skip)
  • ScheduleAware (SetScheduleData): measured idle fraction for the serverless auto-pause branch
  • SKURatesAware (SetSKURates) + TargetSKUCandidates: source/target DTU-tier rates for the non-serverless step-down branch

The DTU floor and lookback window

Terminal window
azureDTUThreshold=5.0, azureDTULookbackDays=30

Auto-pause or a one tier DTU step down

branched on compute tier; no flat fraction.

  • Serverless-vCore → enable/shorten auto-pause. Auto-pause stops the compute charge only (storage keeps billing). Saving = cost × sd.IdlePercentage (real measured idle fraction from SetScheduleData); absent/zero idle data => abstain.
  • Non-serverless (DTU model / provisioned vCore) → one-tier DTU step-down (rightsize). Pause is impossible; priced from the real source→target DTU-tier rate delta via DeriveCatalogDiffSavings(src, dst, cost, 0) (mirrors sibling RC-230, lever suggestSmallerSQLDTU). No smaller rung resolves, or either DTU-tier rate missing/inverted/out-of-band => saving 0 => abstain (no 30% estimate under the cost-driven idle category). Abstains on pricing absent (cost ≤ 0). EvalContextRule: a DB with a known active schedule is suppressed (intentionally parked off-hours, not abandoned).

Pausing, scaling down, or dropping the database

  1. Check Azure Monitor metrics for DTU/CPU usage
  2. Verify no applications are connecting
  3. Serverless: configure auto-pause delay (min 15 min); storage keeps billing while paused. Non-serverless: scale down one DTU tier.
  4. If not needed, delete the SQL database

DTU usage paired with a connection guard

DTUPercentage (DTU avg gate) + SQLConnectionSuccessful (required corroborating activity guard), both over azureDTULookbackDays (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·