Migrating Applications to Windows Azure – SQL Server to SQL Azure

SQL Azure Database is a cloud database service from Microsoft. SQL Azure provides web-facing database functionality as a utility service. Cloud-based database solutions such as SQL Azure can provide many benefits including rapid provisioning, cost-effective scalability, high availability and reduced management overhead.

The SQL Azure Portal gives you a simple page to create your database. Choose the size (1gig / 10 gig) and give it a name. The tool will also provide you the connection strings so that you can easily implement a data access component using ADO.NET or ODBC.


Since SQL Azure is based on SQL Server, moving tables and stored procedures to the cloud was not difficult. I used a combination of SQL Server Management Studio to take my existing database schema and create the database tables and stored procedures in the new SQL Azure Db. I then used BCP (Bulk Copy) command line instructions to load the data. Here is the sample BCP command form the Azure Trinaing Kit

bcp HolTestDB.SalesLT.Customer in Customer.dat -S [YOUR_ASSIGNED_SERVER].database.windows.net -U [YOUR_USERNAME]@[YOUR_ASSIGNED_SERVER] -P [YOUR_PASSWORD] -n -q 

I recently found out there is a database migration wizard available on CodePlex. For details check out this blog post.

The database for Sounds Familiar consists of several tables and stored procedures as you can see from this screen shot from SQL Server Management Studio. I was able to reuse the table design, the stored procedures and all the data from the previous implementation.


There are differences between SQL Azure and SQL Server . This whitepaper details those differences.

Return to the main page

Go to the previous section of the article

Go to the next section of the article