Creating and Accessing an Azure SQL Database

I was asked to do some work with Azure, Microsoft’s Cloud platform. I looked briefly at Azure a few years ago when it first came out, but that experience was a technical disaster (the technology was definitely released before it was ready), so I was a bit geek-apprehensive.

In order to get started I decided I’d create a dummy SQL Server database on Azure and then write a C# program that accesses the database. How hard could that be?

To cut to the chase, I eventually succeeded but the mini project took about 17 hours total.

Most of the problems were due to 1.) chaotic and out-of-date documentation because Azure changes so quickly, 2.) multiple security issues including accounts, subscriptions, passwords, PINs, certificates, and firewall settings, and 3.) many configurations and compatibility issues with different versions of Visual Studio, different versions of Azure SDKs, different versions of SQL Server, different versions of SSQL Server Management Studio, and different versions of the .NET Framework.

In short, the experience was rather ugly from a developer’s point of view.

First, I had to figure out the whole Azure account and subscription thing. The documentation was very difficult to wade through and in the end my colleagues at work showed me how to get started otherwise I’d have been dead in the water (thanks Rob, Gavin, Dan, and Gaz!) Time: 4 hours.

Second, I had to figure out how to get to the Azure portal Web site, log in and learn to navigate the rather complex dashboard. This wasn’t too bad. Time: 2 hours.

Third, I had to learn how to create a new SQL Server machine and an empty SQL database. Luckily I found a very nice, mostly up-to-date reference by Jeff Gollnick at Time: 4 hours.

Fourth, I had to learn how to access my new server and database using the SQL Server Management tool, my preferred method of working with a SQL database. This took a while, mostly to deal with the firewall and ports. I made a simple table of employee information. Time: 4 hours.


Fifth, I had to figure out how to access the database from a C# program. This wasn’t too hard for me because I’ve done this sort of thing many times before. Time: 3 hours.


The moral of the story is this: Most of the Azure related articles I read and talks I hear seem to have an attitude that working with Azure is super easy. Well, yes and no. Like many things in software, Azure is simple once you know it, but getting started is not trivial.

This entry was posted in Miscellaneous. Bookmark the permalink.