SQL Off-Hours Schedule (Azure)
CostLens flags dev/test Azure SQL Databases running 24×7 that could auto-pause (serverless) or run on a business-hours schedule, saving ~65%.
CostLens flags schedulable dev/test Azure SQL Databases — databases tagged or named for a non-production environment. Non-production databases rarely need to run nights and weekends; serverless auto-pause or an off-hours schedule typically saves ~65% of the compute cost.
Serverless is the easy win
For single databases with intermittent use, the serverless compute tier auto-pauses during idle periods and bills only for storage while paused — no schedule to manage.
How it works
Databases are enumerated
CostLens lists SQL databases via the Azure Resource Manager API (the system master database is skipped).
Schedulable databases are identified
A database is flagged when an environment/env tag (or its name) indicates dev, test, staging, QA, UAT, or sandbox.
Savings are estimated
Estimated from the database SKU capacity (DTUs/vCores) × the fraction of hours saved by running only business hours (~65%).
What to do
- Confirm the database doesn't need to serve traffic 24×7 (no overnight jobs, no cross-time-zone use).
- Move a single database to the serverless tier with an auto-pause delay, or use an automation runbook / Elastic Job to scale it down (or pause an elastic pool) off-hours.
Severity levels
| Severity | Estimated monthly savings |
|---|---|
| critical | >$500 |
| high | $100–$500 |
| medium | $20–$100 |
| low | <$20 |
Required permissions
- Detect:
Reader— see Azure Accounts.
Limitations
- Detection is heuristic (tag/name based) — review before scheduling a production-critical database.
- The estimate assumes 24×7 provisioned compute today; a database already on serverless will show less real saving.
- See also Idle SQL Database for databases that are idle rather than schedulable.