SQL Azure Down – how I got labs.red-gate.com back up

11:06am – Currently SQL Azure in western europe is down

How do I know this? Well on labs.red-gate.com (my Azure website) I have elmah installed which started sending me e-mails about connection failures from 10:40am when trying to get the dynamic content from the database (I was too busy playing with my new Eee Pad transformer to notice immediately). Going to the website confirmed the failure and trying to connect to SQL Azure from SQL Server Management studio and the Management confirmed bad things were going on.

11:15am – Need to get the site back up

Luckily due to SQL Azure Backup I have a local database with contents from my SQL Azure database on my local machine. So I now need to get this to be publicly visible, change the connection string in my website and then we’re all good (making a lot of assumptions along the way)

My options to get the database live go something along the lines of.

  1. Punch a hole in the firewall straight at my computer
  2. Use an already internet visible SQL Server and put the database there
  3. Create a new internet visible SQL Server and likewise restore the database
  4. Create another SQL Azure Server and put the database there

Not everything is going smoothly now. There’s a little panic setting in. Punching a hole in the firewall to my computer is a bad idea. We don’t have any network visible SQL Servers and changing the firewall rules on anything is going to take too long.

Attempting to create another SQL Azure Server is failing – seems to be claiming I don’t have any

image_thumb.png

We also have monitor.red-gate.com running on AWS – does that have a SQL Server handy for me? – No, although we do have a SQL Azure Server already setup and running in another datacentre. Great! A solution.

12:00(ish)pm Use SQL Compare/SQL Data Compare to restore data contents to Azure

Using SQL Compare and SQL Data Compare I start synching the schema and data from my local RedGateLabs database to the new database I created in SQL Azure in north america. Whilst doing this I start changing the connection strings to point to the new server and run a local copy to test the database has synch’ed up properly. All seems good.

12:18pm Deploy site to staging – test if site works and switch to live

Start the publish process from Visual Studio and 12 minutes later we have a working labs.red-gate.com on stanging using the SQL Azure Server in north america. Perform a swap to get staging live and we’re done. It’s back up thanks to a lot of luck and a little preparation.

12:25pm Publish this article

And…breath…