CostLensOversized SQL Storage (Azure)

Oversized SQL Storage (Azure)

CostLens flags Azure SQL Databases allocating far more storage than they use, so you can reclaim the headroom and cut the storage charge.

Updated July 20261 min read

CostLens flags Azure SQL Databases with far more allocated storage than used. Provisioned storage is billed whether or not it's used — a database sitting at a fraction of its max size is paying for capacity it doesn't need.

How it works

Databases are enumerated

CostLens lists SQL databases via the Azure Resource Manager API and reads each database's maxSizeBytes.

Usage is measured

The storage_percent metric is read over 14 days. Databases over 50 GB allocated but under 40% used are flagged.

Savings are estimated

Priced as the reclaimable GB (allocated − used − 20% headroom) × the per-GB storage rate.

What to do

  1. Confirm the database isn't about to grow (bulk load, retention change).
  2. Lower the database's max size to a level with sensible headroom above current usage (Database → Compute + storage).

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

  • Storage is included in the tier for some DTU databases — the estimate is a ranking signal; verify the storage line on the bill before resizing.
  • Databases with no metric data are skipped rather than guessed.
CostLens
Previous
SQL Off-Hours Schedule
CostLens
Next
Over-Provisioned Cosmos DB