An Azure relational database service.
Hi Gururaj Karthik,
Azure serverless database bills for the amount of compute used per second. The serverless compute tier also automatically pauses databases during inactive periods when only storage is billed and automatically resumes databases when activity returns.
The configuration of these parameters shapes the database performance experience and compute cost.
The auto-pause delay is a configurable parameter that defines the period of time the database must be inactive before it is automatically paused. The database is automatically resumed when the next login or other activity occurs. Alternatively, automatic pausing can be disabled.
The cost for a serverless database is the summation of the compute cost and storage cost. The storage cost is determined in the same way as in the provisioned compute tier.
- When compute usage is between the minimum and maximum limits configured, the compute cost is based on vCore and memory used.
- When compute usage is below the minimum limits configured, the compute cost is based on the minimum vCores and minimum memory configured.
- When the database is paused, the compute cost is zero and only storage costs are incurred.
Auto-pausing is triggered if all of the following conditions are true during the auto-pause delay:
- Number of sessions = 0
- CPU = 0 for user workload running in the user resource pool
The following features do not support auto-pausing, but do support auto-scaling. If any of the following features are used, then auto-pausing must be disabled and the database remains online regardless of the duration of database inactivity:
- Geo-replication (active geo-replication and failover groups).
- Long-term backup retention (LTR).
- The sync database used in SQL Data Sync. Unlike sync databases, hub and member databases support auto-pausing.
- DNS alias created for the logical server containing a serverless database.
- Elastic Jobs, Auto-pause enabled serverless database is not supported as a Job Database. Serverless databases targeted by elastic jobs do support auto-pausing. Job connections resume a database.
The presence of open sessions, with or without concurrent CPU utilization in the user resource pool, is the most common reason for a serverless database to not auto-pause as expected.