Deploying a database to Azure

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.

Database selected, tasks and search for deploy database to Microsoft Azure SQL Database

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?

Easy enough

You click next, to get to the summary:

Yeah cool, go!

Now, you wait for a few minutes and you nice database will be deployed.

Well? I’m waiting?!?
This is what i’m hoping for!

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:

Not what i was hoping for

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.

Let’s get serverless

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? 😉

There you are!

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!

I’ve selected max 4 vCores and an auto-pause delay of one hour.

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?

cheap as chips!

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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s