Systems Engineering and RDBMS

Getting Started with the Azure Platform

Posted by decipherinfosys on December 24, 2009

We have talked about MSFT Azure in some of our posts in the past but started playing with it only recently.   Once you register and get the invitation token, you can get started with it – in this post, we will cover the steps for connecting to SQL Azure, creating a user database, configuration required to be able to connect to it remotely from your laptop and then will test that connection using a connection string.

In case you have not played with SQL Azure yet, you will first need to register for SQL Azure – here.  Once you are done, you will get an e-mail from MSFT with the invitation code.  The steps are pretty straight forward and are laid out in a very easy to follow chronological order.  Once you complete them, you would then have a screen that looks like this (this is true as of the latest CTP) where you can then proceed to create a new user database:

Once you have created a new user database, you can then highlight it and click on the connection strings tab in order to get the valid ADO.Net and ODBC connection strings that you will need to be able to connect to the instance and your database in the cloud that you just created.  It will look like this (UID and Pswd have been blanked out for obvious reasons):

Now that you have the connection string, before we proceed further we have to configure the firewall settings to allow connections from the IP address of our machine from where we want to connect from.  So, click on the “Firewall Settings” tab and you will see a screen like this where you can enter your IP address (or a range):

Now, we should be all set to make the connections from that IP address.  Let’s give it a shot by using SQL Server Management Studio and also a UDL from that machine that we can then use in our .Net application.  So, open up SSMS connection window just like you normally do when connecting to your instances and type in the specific information that you saw in the connection strings above:

Before we connect, we have to make a change under the Options Tab.  As of this CTP, we need to specify the name of the database that we will be connecting to since the usage of the “USE” command is not allowed so if you do not do this step, you will get an error that the object sys.configurations was not found.  So, click on the Options Tab and you can type in the name of your database:

Once this is done, click on connect and you will be able to connect through SSMS.  The object explorer window will be empty but you will have the Query window and can write your T-SQL statements to create the schema and other objects in there:

You can also test the connection using a UDL:

So, there you go.  You are all set now to create your schema objects in the database in the cloud and then connect to that instance and database and work on your applications.  In the upcoming posts, we will explore the Azure platform more and will look into Windows Azure and the Service Bus and Access Control Services (previously known as .Net Services).

Resources:

There is a wealth of information out there at the MSFT site and many of those links you will get in the e-mail in which you will get the invitation code from MSFT.  You should pay particular attention to the forums – chances are that someone else might have already faced the issue that you are facing and you can find your answer(s) over there itself.  Some of those links (as provided by MSFT) are here:

SQL Azure Documentation:

http://msdn.microsoft.com/en-us/library/ee336279.aspx

SQL Azure Forum:

http://social.msdn.microsoft.com/forums/en-US/ssdsgetstarted/threads/

SQL Azure Blog:

http://blogs.msdn.com/ssds/

Quick Tip:  Using SQLCMD with SQL Azure

http://msdn.microsoft.com/en-us/library/ee336280.aspx

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 )

Google+ photo

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

Connecting to %s

 
%d bloggers like this: