One of the questions that clients often ask is: What tools could be used for Windows Azure development. Everyone knows that you need a web browser and a code editor (ex: Visual Studio), but what else? So, I decided to do a serie of posts to present them. I’m therefore beginning with the indispensable SQL Azure Migration Wizard, since it’s used more often at the beginning of a project.
This serie is not meant to be an exhaustive list of all tools. Some other excellent tools are surely available. If you think I have forgotten one or want me to talk about one, let me know. I will be more than happy to adding it to the list.
What is SQL Azure Migration Wizard?Most of the Azure projects that are starting these days are migration project or at least contain some data migration. The SQL Azure Migration Wizard, like its name implies , is a tool that will take you be the hand and help you migrate your database. In a few clicks the wizard will bring the database schemas and the data to the cloud.
Because Azure SQL database is very similar, but not totally compatible to Windows SQL Server 2008,the Wizard will also provide you a list of things that you should take care of like a missing clustered key.
How to use itFirst, I will assume that you already have an active Azure account, if you don’t, please follow the instructions on this web page. Then of course you will need the SQLAzureMW tool that you can download on the CodePlex page project. Let’s do a simple migration from a local database to SQLAzure.
|To get started, just double-click on the executable. |
Some options will be proposed, but in our case we need to select: Analyse / Migrate SQL Database (second choice from the top)
|Then pick your source. One nice thing with keeping the Master database selected, the list of all available databases on the specified server will be populated. Once you are done, click the Connect button.|
|The database used in this demo is a subset of Northwind database with three tables: Products, Suppliers, and Categories.|
Once you have selected what you wanted to migrate, click the Next button.
|Here three outputs are generated: |
|For the next step you will need a database server in Azure. So connect to the Azure portal, and from the left panel select Database.|
You can than create a new server by clicking the Create button. You could also use a server that you already have.
Put the server name in your clipboard you will needed.
|Back to our SQLAzureMW, paste the full name of the server in the Server name dropdown. It should be something like xxx.database.windows.net|
Then enter the credentials of your SQL server. Note that the username should be follow by “@” and the first part of the server name.
Click Connect when you’re done.
|Since no database was created, the list is empty. Let’s create a new database by clicking the Create Database button.|
A popup window will ask for the name, location and format of the database to be created.
Click Create Database, and after few seconds you should be able to click the Next button to continue.
|To see that the new database is really created go on the AzurePortal: you will see it in the database section.|
|After a quick confirmation the migration will be done.|
A Nice summary is displayed so you can see if something went wrong.
The migration has been performed successfully, click Exit.
|You can now connect to the new database by SQL Server Management Studio or by the Azure Management Portal.|
You can see that the three tables are there and the data has also been migrated.
|Like it was supposed to, the index was successfully created. This is really magic!|
ConclusionTo conclude, let’s say that this tool is really fantastic and that you should definitely try it if you are planning to do a migration. It will save you a lot of time. Please note that the SQLAzureMW does not manage logins and users. I therefore strongly suggest using the Azure User Management Console – AUMC, available on CodePlex.
If you have any comments, suggestions or experiences to share, feel free to let me know by adding a comment, by e-mail or by the contact page. Next post is about the Windows Azure Auto-scaling Application Block (WASABi)
- Windows Azure : https://windows.azure.com
- CodePlex SQLAzureWM: http://sqlazuremw.codeplex.com
- Management Portal: https://manage.windowsazure.com
- Tools and Utilities Support:http://msdn.microsoft.com/en-us/library/windowsazure/ee621784.aspx
- Azure User Management Console – AUMC: http://aumc.codeplex.com