Configure Serverless resource limits
The Serverless compute tier automatically scales compute resources based on workload demand. You can define minimum and maximum compute limits to control cost and performance.
Prerequisites
- Azure subscription with appropriate permissions.
- An existing Azure SQL Database in the Serverless compute tier.
- Azure CLI v2.30+ or Azure portal access.
Step‑by‑step guide
- Open the Azure portal and navigate to your SQL Database.
- Select Compute + storage in the left menu.
- Under Compute tier, choose Serverless.
- Set the Minimum vCores and Maximum vCores values.
- Click Save to apply changes.
Example using Azure CLI
az sql db update \
--resource-group MyResourceGroup \
--server myserver \
--name mydatabase \
--capacity 0.5 \
--family Gen5 \
--tier GeneralPurpose \
--compute-model Serverless \
--min-capacity 0.5 \
--max-capacity 2
Resource limits reference
| Parameter | Allowed range | Default |
|---|---|---|
| Min vCores | 0.5 – 8 | 0.5 |
| Max vCores | 1 – 40 | 4 |
| Auto‑pause delay (min) | 0 – 60 | 60 |
Monitoring usage
Use Azure Monitor metrics cpu_percent and vCores to track scaling behavior. Set alerts to be notified when usage reaches the maximum limit.
FAQ
- What happens if the workload exceeds the maximum vCores?
- The database throttles queries until usage drops below the limit.
- Can I change limits without downtime?
- Yes, adjustments are applied dynamically without restarting the database.