Welcome back to another week of SQL University. This week we are going to spend some time getting familiar with SQL Azure, which is really just a fancy term for ‘distributed computing’. And while you may not have a need for such a thing today you should spend time getting familiar with SQL azure because one day it will be the most dominant version of SQL Server.

tempdb

Do you even know how to get started with SQL Azure? No? Go here and join the free trial. And by “free” I mean you have to give them a credit card number and you will be charged for any use over your specified trial amount. Last year I signed up for this same “free” trial and got billed a whopping $1.06 that I was not expecting.

But I never canceled my account. Partly because I couldn’t, and partly because I knew I would need SQL Azure again sometime. And eventually so will you. So, might as well succumb to the Cloud and go ahead and give in to our dark overlords now.

msdb

OK, you have your account, so now what? Well, you need to connect up to the Cloud. First thing I want you to understand is that Windows Azure is the platform that SQL Azure will sit on top of. Since this blog is part of SQL University, I will focus my comments and thoughts on SQL Azure. But it warrants mentioning that you are not going anywhere with SQL Azure without having Windows Azure.

Make sure you have the SQL 2008 R2 version of SSMS installed somewhere, as you can use that version in order to connect to SQL Azure directly. You can also use Visual Studio to connect to and develop against Azure as well. There is also a ‘Database Manager’, a Silverlight interface that allows for you to connect to and manage your databases in the Cloud.

So go ahead and start creating some databases in SQL Azure. Learn more about what is allowed and not allowed. For example, you can create a table without a clustered index, but you will not be able to load data into the table until you have a clustered index defined.

model

Here you want to be able to move data in and out with ease, and to be able to perform some basic diagnostic info.But here’s the catch: SQL Azure is a completely different version of SQL. As of this blog post the version number is 10.25.9501.0, so think of it as something in-between SQL 2008 and SQL 2008 R2. That means your standard set of DMV queries will not necessarily work against Azure. For a nice list of useful queries you can run check out Glenn Berry’s blog post on the subject.

If there was one thing I would tell you that Azure needs to make easier it is this: billing and backups. OK, so that is two things, so I will focus on just the billing for now. See, you really don’t have an easy way to know and keep track of how much your Azure database will cost you. Well, I sure didn’t when I got charged that $1.06. I mean, I was given my bill, and it had lots of lines, but to this day I have no idea what I did that went “over” my allotted amount of usage.

If you want to be at the model level for SQL azure then you need to be aware of how billing works but more importantly you need to be able to judge for yourself how much you can expect to be charged. This will make it easier for you to decide if migrating an application to the cloud is financially viable.

(As for backups, you can’t do them, so stop asking. Oh sure, I could copy my database into another database, or use SQLCMD or SSIS to pull the data down, but keep in mind you pay for the bandwidth. So, no backups, and no restores. Why would you ever need those anyway?)

master

At this level, you have mastered the ability to spin up servers on Azure, create databases, and migrate your data. You advocate using Azure to someone almost every day.

And your name may or may not be Buck Woody.

resourcedb

There’s only one place you need to go for more info about Azure:

  • Buck Woody (blog | @buckwoody)