Regular readers of this blog know I am all about saving money. I’ve blogged about ways to set up inexpensive instances of Azure SQL DB. I recently learned a couple new ways to save even more money working with Azure SQL. Both methods begin the same:
The Stuff in Common
Begin by connecting to the Azure Portal at portal.azure.com. Once connected and logged in, type “SQL data” into the “Search resources, services, ad docs (G+/)” search box at the top of the portal. Select “SQL databases” in the “Services” category:
When the “SQL databases” blade displays, click the “+ Create” button:
The “Create SQL Database” blade displays.
In this post I describe two options for creating inexpensive Azure SQL DBs, and this is where the methods diverge.
Try Azure SQL Database Free
If you click the “Apply offer (Preview)” button, the verbiage changes to:
Complete the “Create SQL Database” configuration to enjoy a free serverless database with the “first 100,000 vCore seconds, 32GB of data, and 32GB of backup storage free per month for [the] lifetime of the subscription.” That sounds like “free” to me, but I want to make sure I do not misrepresent the offer.
This is the best option because:
- It’s free!
- You get to work with a larger set of data (32GB)!
One Less-Expensive Azure SQL DB Configuration
If I accept the defaults as I initially configure a new server for my Azure SQL Database, I may see the cost of the default server configuration similar to that shown here:
I promise I am not complaining here. I simply note that – most of the time – I do not need a server provisioned according to this default. Most often I build Azure SQL Databases for demos. For demo databases, I can get under $327.97USD per month.
I can hear some of you thinking,…
“How, Andy?”
I’m glad you asked!
One way to reduce the cost of an Azure SQL Database is to manage the following four configuration settings* **, labeled:
- Want to use SQL elastic pool?
- Workload environment
- Compute + storage
- Backup storage redundancy:
* These configuration settings have little to large effect on costs (at the time of this writing), but their effects on costs may vary in the future.
** This is not an exhaustive list of configuration settings that may impact the cost of Azure SQL Databases.
I make the following changes to these configuration settings:
- Make sure SQL elastic pool is set to No
- Set Workload environment to Development
- Configure the database (more in a bit)
- Set Backup storage redundancy to “Locally-redundant backup storage”:
The most impactful change is #3: Configure the database (by changing 1 setting in the Compute + storage configuration).
Remember I wrote earlier: “For demo databases, I can get under $327.97USD per month?” Well, $0.30USD per month is less expensive than $327.97USD per month – a total of $327.67USD less expensive per month:
Configure the SQL Database
The secret to reducing the cost this much is to change one property on the Compute + storage configuration. Click the “Configure database” link to open the Configure blade.
When the Configure blade displays, change the “Data max size (GB)” property from 32 to 2:
This setting dramatically reduces the cost of the database. Of course, if you need to store more than 2GB of data, you will need to increase the “Data max size (GB)” property configuration. But if you can get away with 1GB data max size, the costs are $0.15USD per month:
Pay attention to the math inside the blue box in the image above.
- Cost per GB (in USD) is $0.12
- Max storage selected (in GB) is 1.3
- $0.12 x 1.3 == $0.15 USD per month
Conclusion
I know 1 or 2 GB isn’t a lot of data.
I also know you don’t need a lot of data to learn the basics of Azure SQL DB.
I hope these cost-saving tips help lower the barrier so you begin exploring Azure SQL Databases!
Learn More!
You, me, Azure Data Factory. (Hey! That rhymes!)
Join me 27-29 Feb 2024 for a 2.5-day, live, online course – with labs! – titled From Zero to Azure Data Factory. Register today and save 55%.
Hello Andy, do you know if there is a way to edit the Workspace Environment after the database creation?
I have a few databases that we use for development and I would like to switch them to development.
Thank you
Hi Francesco,
It is my understanding – informed by https://learn.microsoft.com/en-us/answers/questions/1107082/how-to-modify-the-workload-environment-of-a-create – that Workspace Environment is not a stored Azure SQL Database setting, but a configuration option that establishes a default set of database compute and storage configuration ranges. The information “blurb” just below Workspace Environment options is shown in the image above and reads:
“Default settings provided for the workloads. Configurations can be modified as needed.”
To modify compute and storage Azure SQL Database configurations, visit the Azure SQL Database | Compute + storage page to update workspace environment-related configuration settings. The configuration screen header reads: “Service and compute tier” and appears similar to the second image under the heading “Configure the SQL Database” displayed in my post.
I hope this helps,
Andy