Wednesday, June 20, 2012

SQL Azure: Building your first Microsoft database in the cloud


We’ve all been hearing about the cloud for a while and if you’re exposed to Microsoft at all that means Azure. If you’re a database person that means SQL Azure. So what’s it all about? 

Without getting too wordy, it’s more or less a high-availability, hosted version of Microsoft’s SQL Server database. Want most of the benefits of SQL Server but don’t have the hardware or human resources to run it yourself? SQL Azure might be right for you. Maybe you just want to do a quick proof-of-concept or prototype but don’t want to take the time of standing up a SQL Server. SQL Azure might be right for you.

I think I’m probably like a lot of developers in that new technologies can be a little hard to grasp and sometimes even a little scary until I get my hands on it and see it in action. The purpose of this post is to show you how easy it is to create and use database in the cloud on Microsoft’s Windows Azure platform.

Many developers probably don’t know that they get a free subscription to the Azure platform with any Visual Studio Professional, Premium, or Ultimate with MSDN license. Additionally, BizSpark program members also get the same free subscription that is available with Visual Studio Ultimate with MSDN. Details can be found here. If you don’t fall into the MSDN or BizSpark camps and want to give Azure a test drive but don’t want to cut into your budget there is also a free 90-day trial available at the time of this post (http://www.microsoft.com/windowsazure/free-trial/).

Time to start playing. At this point I’ll assume you’ve signed up, have a subscription and are logged in to the Windows Azure portal (http://windows.azure.com). You should see the Getting Started with Windows Azure screen below.

To begin the process of creating a database server and database, click on the Database link on the bottom left hand corner of the screen.

Now click on the Create a new SQL Database Server link.

Choose your subscription. My is named POC for proof-of-concept. 

Select the Region in which you’d like your server hosted.

Now set a password.

You’ll now have to add a firewall  rule to allow incoming traffic from the machine(s) in which you’ll be managing this server.

Once you’ve completed the process of creating a server you’ll come to a screen that provides all the details of your server. You’ll also see that you already have one database, the master  database. The master database is required and cannot be deleted. This database contains things such as permissions and usage metrics.

Now that we have a server we can create a database. Click the Create link in the ribbon-like menu at the top of the screen. Provide a name for the new database and choose an appropriate edition and maximum size. To be safe (in terms of billing) choose a 1 GB Web Edition database.

Congrats! You’ve now successfully created your first Microsoft database in the cloud. 

No comments:

Post a Comment