Last week i wanted to deploy a database to Azure. Not too hard to do, but two days later, i ran out of credits. Take care when you deploy a database to Azure! I’ll show you how to avoid unexpected high costs of your Azure SQL DB.
How do i export my database to Azure?
First up, log in to your local instance, select the database and right-click.
After the introduction screen, you get the deployment settings
After logging in to your Azure SQL DB, you get the following options:
Suppose you just want a standard database that won’t grow really fast but you’d like some performance when you need it a few times during the day. Or you just want a database for some training purposes. Nothing fancy. You select the standard Edition, a size of 10 GB and a Server Objective of S4. Because it sounds nice, right?
You click next, to get to the summary:
Now, you wait for a few minutes and you nice database will be deployed.
Now, check it out in Azure
Now that the database has been deployed to azure, you can reach it and use it. But check out the settings!
When you’ve selected your database, go to the settings and click Configure
There you can see the monthly costs of your current settings:
But! Don’t despair. You can change this, quite easily if you want to. In my case, the database is for trying things out. Once or twice a day. Most of the time, the database is allowed to sleep and heal from my terrible query’s.
Above your cost summary, you can select the vCore based purchasing options. There are other options as well, but those are more expensive (or you can choose basic, but that’s just not how we roll, right? 😉
Now, i can change my provisioned database to a serverless database, and i can configure my vCores and automatic time-out. This will save money!
This is the cheap setting because my min setting for the vCores is really low. I get half a core.
But what will this cost?
Now i just pay something for the storage and, when i’m using the database, i’m paying for the compute power. For this specific set-up it’s perfect! I only get billed when i query, and if i query badly, i will pay.
Is this perfect?
For a database you’ll use every now and then? Yes. For a business critical database? Maybe, but that depends on what you want to spend and the performance your end-users are expecting.
I really like the way Microsoft built this service. If only they would add the serverless option in SSMS.
Thanks for reading and let me know what you think!