John McCormack DBA

SQL Server Databases and Cloud

  • Personal
    • About
  • Free Training
    • SQL Server on Amazon RDS (Free Course)
    • Free practice questions to help you pass DP-900
  • Save money in Azure
    • Azure IaaS SQL Backups – Stop burning money
    • Your Azure SQL Database and Managed Instance is too big
    • Turn the cloud off at bedtime to save 70%
    • Your Azure SQL Virtual Machine might be too big
    • Save money with Azure SQL DB serverless
    • Save up to 73% with reserved instances
    • Delete unused instances to save money in Azure
  • Hire me
    • 60 minute cost optimization
    • Let me solve your SQL Server problems
    • Take a look at my Sessionize speaker’s profile

Save money with Azure SQL DB serverless

20th January 2021 By John McCormack Leave a Comment

This post on how to save money with Azure SQL DB Serverless is part of a 7 part series on cost optimisation with Azure.

Provisioned vs Serverless

Laptop computer with dollar bills

The default option is provisioned which means you are provisioned with the resources you request, and you keep them for as long as you need them. e.g. If you want 2 vCores and 32GB of storage, you have it permanently, or until you shut down the resource.

Serverless means that although your storage is provisioned, your compute resources are on demand. If you enable automatic pausing of your SQL database, this will happen after a period of time defined by you. Whilst the database is paused, you are not charged for compute costs.

So how do you save money with Azure SQL DB Serverless

Autopause

You can set your database to auto pause if there is no activity. The auto-pause delay period must be between 1 hour and 7 days. When your database is completely paused, you only pay for storage. Auto pause in optional so you can keep the database online all the time, but just benefit from the auto-scaling capabilities. ↙

Autoscaling

You can set a maximum number of vCores up to 40 and a minimum number of vCores of 0.5. The allowed minimum is related to the maximum you set. e.g. Where maximum vCores are set to 4 or fewer, you can set a minimum of 0.5.

Azure SQL DB will scale as required meaning you only pay for what you need. You could allow for some head room by setting a higher max vCore limit than you need, just beware that if it is needed, you will be charged for it.

Per second billing

Bear in mind as well that SQL DB Serverless offers per second billing. You pay for increased resources only when you need them. The billing is quite complex for Azure SQL DB Serverless, and you should read this billing guide for more information.

For up to date pricing information, please always refer directly to the Azure SQL DB pricing page.

Remember retry logic

When your database is paused, the first connection attempt will fail with error code 40613. If your database client has connection retry logic, you won’t need to do anything else. Otherwise, you will need to code this logic into your application.

IT Certification Category (English)728x90

Filed Under: cost-optimization, front-page Tagged With: azure, azure sql db, azure sql db serverless

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

John McCormack · Copyright © 2025

 

Loading Comments...