Azure Tools Belt: SQL Azure Migration Wizard


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 it

First, 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.

clip_image001[1] 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)
clip_image002[1] 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.
clip_image003[1] 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.
clip_image004[1]
clip_image005[1]
Here three outputs are generated:
  1. A result Summary: This explains all the steps made to extract the schemas and data of the database. The analysis will also highlight some incompatibilities and suggest some modifications. In this case, since I have not added any primary keys or indexes, it warned me that a clustered index will be added.
  2. SQL Script: A nicely written database creation script that you can save for maintenance.
  3. Data file: Since one of the best way to import massive data in AzureSQL database is by using BCP, some data files have been prepared to be imported.
Click the Next button to continue.
clip_image006[1] 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.
clip_image007[1] 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.
clip_image008[1] 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.
clip_image009[1] To see that the new database is really created go on the AzurePortal: you will see it in the database section.
clip_image010[1] 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.
clip_image011[1] 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.
clip_image012[1] Like it was supposed to, the index was successfully created. This is really magic!


Conclusion

To 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)


~Frank


References

Reading Notes #55

Ruby_in_AzureCloud

Programming

Miscellaneous


~Frank



    Reading Notes #54

    Web Sites or Cloud Apps
    Cloud
    Programming
    Miscellaneous
    • Defend Your Sweet Spot (Peter) - Interesting post by Peter Bregman, the author of 18 minutes, that explains why finding and keeping your sweet spot is important.
    […] time management isn’t primarily about using minutes well, it’s about using yourself well.[…]

    ~Frank


    Reading Notes #53


    This post is an important milestone for this blog. It completes the first year of Reading Notes, since a year as 52 weeks and it’s also the 100th post!

    Thanks for being there and continue reading, a lot of good stuff is coming…

    ~Frank


    2012-07-02_0720
    Cloud
    […]great video of a presentation on Federations by Cihan Biyikoglu at the 2012 US Tech Ed conference in Orlando. […]
    […]Following is the high-level technology selection considerations section from the full article on MSDN. […]
    Programming
    […]new build system based on Ben Alman’s awesome grunt tool. […]
    Miscellaneous


    ~Frank

    Reading Notes #52

    CloudyBrain
    Cloud

    Programming
    [...]When Should I Use the Caching Application Block? This topic will help you to decide if the block is suitable for your requirements. It explains the benefits of using the block, and any alternative techniques you may consider. It also provides details of any limitations of the block that may affect your decision to use it.[...]

    Miscellaneous


      ~ Frank


      Quick question

      Create your free online surveys with SurveyMonkey, the world's leading questionnaire tool.

      Reading Notes #51

      Cloud Storage
      The Cloud Storage
      Cloud
      • Setting up a webfarm using Windows Azure Virtual Machines (Maarten Balliauw) - Nice post that explains how to build a web farm with a free load balancer using the brand new Windows Azure. This post pass-through all steps putting the emphasis on important notion to have a nice web farm up and running.
      […]Sysprep ensures the machine can be cloned into a new machine, getting its own settings like a hostname and IP address. A non-sysprepped machine can thus never be cloned.[…]
      Programming
      • Marked As Pertinent - The perfect post to read when looking for a NoSql (or a key/value store), because this post compare a lot of them.
      • Nuno Filipe Godinho - Very nice feature. You don’t need any more to uninstall Azure SDK to install a new one! Even more you have a new dropdownlist that will act as a filter in visual studio when creating your new project.
      • DFW Ajax Users Group - Nice post that presents the characteristics of the two main architecture of site (with sample) and explains why most actual sites are in fact hybrid.
      • Using the Windows Azure Cache Preview with SDK 1.7 - Nice demo of Azure Cache preview and a quick fix on a potential problem you could have trying it with the emulator.
      Miscellaneous
      […]Come up with a plan and assemble what you need, but whatever you do, don’t label this vision as impossible[…]


      ~Frank


      Reading Notes #50

      AzureGiftRainCloud

      Programming

      Miscellaneous

      ~ Frank


      Reading Notes #49

      hybrid_app

       

      Cloud

      Programming

      Miscellaneous


      ~ Frank


      Reading Notes #48

      Monkey
      Cloud
      Programming
      Miscellaneous
      […]Sources, InkMesh is the best search engine I have found for identifying if an author or a book is available in eBook form,[…]
       
      ~ Frank


      Reading Notes #47

      Balance_cloud

      Cloud


      Programming

      • An Introduction to NuGet - Nice post that explain quickly what is NuGet and witch tools are available.
      • Why I Hate Unit Testing - What a nightmare! I'm not sure that this post will help the undecided to join the unit testing but this JusMock tool deserved a look.
      "This is easy to do with Telerik JustMock. I wrote about using JustMock to get you started in From Legacy to Dependency Injection.
      Steve Forte and Joel Semeniuk have a great presentation on this called The Agile Buffet Table."


      Miscellaneous

      • A Super-Efficient Email Process (Peter) - Explain a simple method to be more productive and efficient with e-mail management.
      • the Continuous Client (Joshua Topolsky) - So true, I'm looking for a continuous Twitter client for a long time now. I don't understand why this isn't in all application. Congratulation to Kindle for this! You can start reading on one device and continue to another one without effort.
      • 9 Steps to Take When You Loathe Your Own Blog (Guest Blogger) - Having a blog is a lot work. Here are 9 tips to keep you inspired and proliferates.
      • 5 Things to Ask Your Cloud Backup Services Provider - I'm a Mozy user and really happy with it. Of course this post is also a sales pitch but the questions are the good one and should be considered when selecting your backup solution. When did you do your last backup?
      • 5 Steps To Choosing The Right Challenges (Brendon Burchard) - Nice post that give good tips to identify good challenges.



      ~Frank


      Reading Notes #46


       

      Cloud

       

      Programming

      “there is, as Joshua Topolsky puts it, “a missing link in our computing experience” (engt.co/9GVeKl). “
      • The key to AddOrUpdate (Arthur Vickers) - While waiting for the next release of EF this post explain very clearly how to implement an extension method to help use in a more generic context when we want the same functionality of the DbSet.Find in a AddUpdateEntity method.
      • Mocking Dependencies != IoC (or at least it doesn’t have to) (Vincent-Philippe Lauzon) - Interesting tutorial that explains an alternative to mock without using dependency injection IoC by using the Lazy.
       

      Integration

      • Michael Stephenson - Tips on when not using BizTalk config file and reference on another post to more details.
      "I wrote a blog post a few years ago around the options for where you could put configuration settings in BizTalk (Click here)."
       

      Miscellaneous


      ~Frank


      Reading Notes #45

      WasabiCloudCloud

      Azure lets us focus on our product rather than focusing on how we need to scale the application
      “For a rich comparison of SQL Azure and Windows Azure Table storage, see Joseph Fultz’s MSDN Magazine article at: http://aka.ms/SQLAzureVsAzureTables.”
      This blog has three posts that give detailed explanation of how a test rig with Controller and Agents can be created in Windows Azure.”
      There does not seem to be any good working OAUTH v2 examples for Java using ACS

      Programming


      Miscellaneous


      ~Frank


      Reading Notes #44

      They Will Bring You In The Cloud
      They will bring you in the cloud.

      Cloud


      Programming

      • Code First model builder versions (Arthur Vickers) - This post explain how to configure EF code first to avoid any breaking code when updating the framework to a newer version. Nice work.
      • Créer son propre Gem et le publier - Very nice tutorial (in French) that explain in detail with a simple case how to create and also publish a Ruby Gem.

      Miscellaneous

      • 5 Tricks for a Killer Company Blog - Five simple tips to get started blogging in a business perspective.
      • Hit the Presentation Sweet Spot - Twenty minutes is very short. Maybe it is a good idea for a specific type of presentation... How do you plan a 2-3 formation?
      • Your Personal Brand as a Developer: Implementing (Part 2 of 2) (Jonathan Rozenblit) - Part 2 on an unusual topic but important. Our brand, as a person. On the internet everything is amplified and could be seen by a lot of people very quickly. A post to read "before it is too late".
      • Coping with Email Overload (Peter) - This could be a good advice for a lot of people. While I'm working on a project where co-workers are across the country I not sure I can do this but maybe tweaking it with rules for only those people.