Skip Navigation LinksHome > Categories > Code from a Category

Migrating SQL Server Database to SQL Azure



User Name: tippu
Name: King SheZ
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
7 years of enterprise application development, so far in my career i have worked on enterprise web applications with millions of users,i have also worked on many integrations between applications, i h... [More]
Viewed Times: 2865
Add Date: 07/15/2011
The conversion of a SQL Server database into SQL Azure for publishing in the cloud can be done by multiple ways but i will use the SQL Azure Migration Wizard which you can find on CodePlex. For the purpose of this post I have decided to try and Migrate the AdventureWorks sample database into SQL Azure format.
Once you have installed the Adventure Works databases from the link above when you logon to your local instance of SQL Server you should see the following databases listed.



Now your databases are ready and you can start the conversion wizard by running the SQL Azure Migration wizard executable which presents you with the following screen.





As you can see above the SQL Azure Migration wizard will allow you to migrate a T-SQL script file into the SQL Azure format as well as Migrate a SQL Server DB into the SQL Azure format. I have chosen the SQL DB option as shown below.





You are then prompted to enter the logon details for logging into the SQL Server instance that has the database to be migrated as shown below.







After choosing which database you wish to migrate you can then choose which database objects you want to migrate via the standard or advanced options as shown below.





For this post I?ve chosen the Script all database objects option. The following screen then shows a summary of the selection options chosen from the previous screens.





Then you are asked to confirm the generation of the script before proceeding.



Once the script is generated you will get the following screen showing a log of all actions of the script



You can then go ahead and execute this script on your SQL Azure instance as shown below.

Enter your azure DB connection details



Select the Database to execute the queries on or create a new database.





Run the script

Once the script has been completed you will see the following screen confirming the success/failure of the different operations that have been undertaken by the script.





Finally, you can then connect directly to your SQL Azure instance from SSMS to check the items generated by the migration as shown below.



Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.