Monday, October 6, 2014

SQL Server in Azure : Additional Storage

When you provision a SQL Server virtual machine (VM) in Azure, by default you are given two drives:

The C:\ volume is, as you would expect, where all of the system files and system databases have been created. As a DBA, I know I don't usually want to store my database and log files on the root directory. Call it habit, but it still doesn't seem like the right thing to do, even in Azure. Plus, there is only about half the drive available anyway. That is not going to scale as my database files grow. Time to look elsewhere.

The D:\ volume looks very tempting at 192 GB of free space! To be fair, the size varies depending on the server size you choose - this example used a D4 VM allocation. Officially, MSFT states that this drive is used to save the system paging file. While you can save files here, it is at your own risk. Since this drive could and likely will be recreated on occasion, anything you save there will be lost. Remember these are VMs, and any reason for the VM to move to a different host will cause the D:\ drive to be rebuilt. Full details regarding the "Temporary Storage" can be found on the Microsoft Azure Support Team Blog.

Okay, so let's create our own, persistent storage for this server. This way, we can determine what allocation to use. It is very simple, just locate your VM, and select it. You can do this from either the Virtual Machines dashboard, or the individual VM dashboard. 

Just make sure you have the correct machine selected before you "Attach". You will be prompted to choose a size for disk, and that's all you need to go! Now, when you connect to your SQL VM, you will see the additional Data drive on E:\. You can attach multiple drives, so if you want to isolate your log files and TempDB as you would normally on-premises, you can.

So, how much is this going to cost? At the time of this writing, storage in Azure is really on the reasonable, if not downright cheap, side.

Depending on how much Azure-related redundancy you want to configure for your additional drives, you can pay as little as $0.024 per GB (up to 1 TB). Yes, that is UNDER 3 cents per GB - per month. So, let's say you need 100 GB, over a year's time, that will cost you $7.20 x 12 months = $19.20. That's it!

Full pricing on Storage and information on redundancy can be found here:

I hope to continue my SQL Server in Azure series over the next serveral months, so thanks for stopping by and check back again!

No comments:

Post a Comment