If you want to migrate an existing SQL Server database to a SQL Azure database in the cloud, you will find the SQL Azure Migration Wizard very useful indeed.
The SQL Azure Migration Wizard is an open-source project hosted on CodePlex, so you could, if you wanted to, download the source code and add your own features.
I can’t believe that Microsoft themselves didn’t think to include something like this in the Azure SDK. Without it, I would have found the process of creating a SQL Azure database a lot more time-consuming and error-prone.
As it is, the wizard will analyze your database, warning you of potential incompatibilities with SQL Azure features, then generate a script that will create your SQL Azure database for you, complete with data. I tried it on the Northwind database, and had a version running in the cloud in minutes.
It’s worth pointing out a couple of minor ‘gotchas’ I came across whilst using it:
- Your SQL Azure user name must be in the form user@servername where ‘servername’ is the dynamically-generated name of your SQL Azure server instance.
- The wizard is not yet sophisticated enough to work out dependencies between objects and create them in the right order. I had an instance where the creation of a view failed because the table had not yet been created. The table creation statement was a few lines further down in the script.
Despite these minor points, it’s a great time-saver and best of all, it’s free!