Home / Cloud computing / Getting Started with SQL Azure

Getting Started with SQL Azure

After getting an account, you can log in at http://sql.azure.com.

They provide a very basic web interface lets you set up the firewalls or create new databases, but that’s about it. To do anything interesting you have to connect via code or the management studio.

The most recent version of MS SQL Server Management Studio (2008 R2) supports connecting to Azure. It’s possible to get earlier versions to connect, but 2008 R2 also ships with an Import/Export wizard that is supposed to support migrating data to Azure, but I have had little success with that. The open source Azure Migration Wizard has been far more reliable at moving data and informing you of any issues you’ll have migrating to the cloud.

When you connect via management studio the standard “object browser” does not work, but you can connect via a new query window:

Then specify the connection parameters, and under “options” select the database you want to connect to:

The first time you’ll attempt to connect chances are you’ll get an access denied error. SQL Azure’s firewall defaults to blocking all incoming traffic, so before you connect you have to open access to your current IP address, or the range of IP’s for your location. This is easy enough to do from your account at http://sql.azure.com. If you still cannot connect check your local firewall and ensure that the TCP 1433 is not blocked for outgoing connections (this is the port used by Azure).

Once connected you have a standard query window in Management Studio, and you can perform virtually any T-SQL function. With a few restrictions, Azure is a standard SQL server database, and very simple to work with.