Connecting to SQL Azure CTP
If you haven’t tried out SQL Azure, you have until November 2009 to demo it until they begin charging customers for their usage. The service itself is still in its infancy, but the latest iteration finally supports relationships which is a big win in my book. Besides, what good is non-relational data (other than the fact that it scales very well)?
There are two ways I’ve found to connect to SQL Azure. The first is using sqlcmd, a command-line utility and the second is using SSMS query window. Unfortunately, there is no current support for using SSMS “Connect to Database Engine”, but Microsoft is getting much closer to creating rich support for their new cloud-based storage with the latest CTP.
Here is a sample of using the sqlcmd utility. You can substitute your login for <loginname> and your server for <servername>
sqlcmd -U <loginname>@<servername> -S <servername>.ctp.database.windows.net -d master
There are limits to the current SQL Azure CTP for long-running queries and idle connections (e.g. five minute timeout), but overall you can get a good taste for the cloud model. There will be latency associated with using a remote database instead of a local network database, but Microsoft is recommending that you also host your web applications on Windows Azure to get the best performance.
One improvement that I hope to see that will help secure these public endpoints is some sort of whitelist (think about how some web services are secured today) to restrict which users can access the SQL Azure databases open on TCP 1433. Some users have already mentioned this potential security flaw.