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:
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).
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:
SQL Azure Forum:
SQL Azure Blog:
Quick Tip: Using SQLCMD with SQL Azure