CostLensIdle SQL Database (Azure)

Idle SQL Database (Azure)

CostLens flags Azure SQL Databases averaging under 5% CPU over 14 days so you can pause, scale down, or remove idle databases.

Updated July 20261 min read

CostLens flags idle Azure SQL Databases — databases averaging under 5% CPU over the last 14 days. An idle database keeps billing its provisioned DTUs or vCores continuously; downsizing, switching to serverless auto-pause, or removing it captures the cost.

How it works

Databases are enumerated

CostLens lists SQL databases via the Azure Resource Manager API (the system master database is skipped).

CPU is measured

The cpu_percent metric is read over 14 days. Databases below a 5% average are flagged as idle.

Savings are estimated

Estimated from the database SKU capacity — DTUs (Basic/Standard/Premium) or vCores (General Purpose / Business Critical / Hyperscale) — at a coarse rate-card rate to size and rank the finding.

What to do

  1. Confirm the database is genuinely unused (not a low-traffic but business-critical store).
  2. Choose the right action:
    • Serverless auto-pause — for single databases with intermittent use, this stops compute billing during idle periods automatically.
    • Scale down the tier / DTUs / vCores if it's lightly used.
    • Delete (after exporting a .bacpac) if it's truly unused.

Severity levels

SeverityEstimated monthly savings
critical>$500
high$100–$500
medium$20–$100
low<$20

Required permissions

  • Detect: Reader (database metadata + Monitor metrics) — see Azure Accounts.

Limitations

  • The savings figure is a coarse estimate from the SKU capacity — the exact bill depends on tier, region, and licensing. Treat it as a ranking signal.
  • CPU alone can miss storage- or IO-bound activity; review before removing.
  • May overlap with Azure Advisor (Cost), which also surfaces idle databases — both point at the same resource.
CostLens
Previous
Idle NAT Gateway
CostLens
Next
SQL Off-Hours Schedule