SQL Database Migration Wizard (SQLAzureMW) is designed to help you migrate your SQL Server 2005/2008/2012 databases to Azure SQL Database. Project Details
The SQL Azure Migration Wizard (SQLAzureMW) will let you identify a SQL Server 2005 / 2008 database that you want to migrate to SQL Azure or
select an existing SQL file that has the commands you want to execute against SQL Azure.
1) If your source is a SQL Server database, SQLAzureMW will walk you through the different object types (i.e. Tables, Stored Procedures, Views, etc.) and let you decide which ones you want analyzed / scripted. You will be given two options:
- Script to window / SQL Azure - Choose this option to display the SQL script to a wizard window where you can modify it before telling the wizard to script to Azure.
- Script to file - Choose this option if you want to save your SQL script to a file. You can edit this file in SQL Server Management Studio and run it from there or save it and use the wizard to load and run your file.
This wizard will automatically try to make changes to your SQL Azure tables / stored procs / view (for example, text columns will become varchar(max) columns). If you have XML schema collections, it will unbind them since XML schema collections are not supported in the current version of SQL Azure. If you have UDTs defined it will replace them with base type because UDTs are currently not supported in SQL Azure. There are some things like hierarchyID that is not supported by SQL Azure and this program cannot replace automatically. In cases like this, you will have to refactor your code to use something else before you will be able to migrate to SQL Azure.
2) If your source is a file containing TSQL, then you will be given the option to have SQLAzureMW check the TSQL for incompatibilities and fix where possible. A good example of why people use this is because they want to use SQL Server Management Studio (SSMS) to generate the database script with the data
to a file. Once you have the file created by SSMS, you can have SQLAzureMW process the file and then execute the results against your SQL Azure database.Configurable
There is a config file “NotSupportedByAzureFile.Config” that is used to define what to look for / replace within the SQL generated code. This file uses RegEx expressions and if you see a pattern that you want removed from the SQL Script, you can put the pattern in the config file and specify what you want to replace it with (if anything).
When the SQL script is generated, an analysis window will be displayed telling you what areas need to be fixed prior to running the script against SQL Azure. Once you are satisfied, you can tell the wizard to run your script against SQL Azure and your script will be ran against your cloud database and the success / failed results will be displayed in a wizard window.Future Enhancements
This tool is in beta state and there will be lot of changes based on feedback. Be sure to check back for updates often!
Currently this program does not migrate data from your database to SQL Azure. This is something that you will have to do manually through SSIS or script through SQL Server Management Studio. The good news
is that SQLAzureMW v1.0
will be able to migrate your data for you. I am waiting on some new features to be added to SQL Azure which I hope will be by middle of Oct. Look for SQLAzureMW v1.0 in the comming weeks!Note
SQL Azure Migration Wizard does catch all of the compatibility issues between different levels of SQL Server databases (i.e. level 80, 90, and 100). SQL Azure is based on SQL Server 2008 (level 100). If you are migrating from an older database (level 80 or 90), you should go through the upgrade process first (at least in the dev environment) and once on SQL Server 2008, then migrate to SQL Azure. Here are some great resources to help you with migrating from older versions of SQL Server:
- Ultimate guide for upgrading to SQL Server 2008: (http://blogs.technet.com/dataplatforminsider/archive/2008/12/04/ultimate-guide-for-upgrading-to-sql-server-2008.aspx)
- Microsoft SQL Server 2008 Upgrade Advisor: (http://www.microsoft.com/downloads/details.aspx?familyid=F5A6C5E9-4CD9-4E42-A21C-7291E7F0F852&displaylang=en)
- SQL Server 2008 Upgrade Assistant: (http://www.scalabilityexperts.com/default.asp?action=article&ID=43)
Ultimate guide for upgrading to SQL Server 2008: http://blogs.technet.com/dataplatforminsider/archive/2008/12/04/ultimate-guide-for-upgrading-to-sql-server-2008.aspx
For information on SQL Azure and the Windows Azure Platform, please see the following resources:
We welcome your feedback! Please let us know if you like this tool or how we can improve it!