Despite my closing comment in my previous post the next step for me, on Azure, was to move an existing site along with one of my modules.

Moving the site was easy. Because it was so small I decided to build the site from scratch as another portal on the existing DotNetNuke instance. 

As a keen sailor I am always looking for ways to help when racing. The module is a relatively simple module I wrote to use myself when racing in Dublin Bay. The purpose of the module is to allow me to look up the course, chosen by the race director, to see what marks are in use, their relative bearings and distances. A very useful feature of the module allows me to enter the wind direction and thus plan for any spinnaker launches before we even start. This, of course, assumes no significant wind shifts!

The module accesses a number of tables for the race data but no SQL table creation was included in the installation package. I ran the module "Install Extension Wizard" without error but when I clicked "Return" at the end my site responded with a 500 Server Error. I used RDP to connect to my instance on Azure and restarted the website which cleared the error.

The next problem to solve was "how do I get my data from the existing site SQL tables into SQL Azure". I connected to my SQL server on Azure using Microsoft SQL Server Management Studio expecting to be able to import from my local instance of SQL. Unfortunately Import was not an option on the Tasks menu


I then tried it the other way around to export from my local instance to Azure. 

This looked promising until it stopped ...


A search revealed  http://blogs.msdn.com/b/sqlazure/archive/2010/04/29/10004618.aspx. At this stage I created an SQL script to do the table creation. The changes required from my existing tables were quite simple. For each table I added IDENTITY to the id field and added

    [id] ASC

This is the script for one table with the changes marked in yellow.

Once I ran the script, to create all my tables, I was able to export the data from my local database to my database on Azure.



Actions: E-mail | Permalink |