Using the Deploy Database to SQL Azure Wizard in SQL Server Management Studio to move to the Cloud

This post is branching off of another post I wrote recently, “Move an On Premise SQL Server Database to the SQL Azure Cloud” where I explained how to move an on premise database to the cloud using the Export/Import Data-tier application. After some comments on this tip, research and testing I think it would be beneficial for the SQL community to understand the different options of moving to the cloud.

If you’d like to follow along with the examples I would suggest creating a free (trial) account at http://www.windowsazure.com. Once you are logged into the Windows Azure portal a SQL Server will need to be created.

Click on SQL Databases, Servers, Create a SQL Database Server:

SQL Freelancer SQL Server Azure
Create a login name, password, and choose your region and click the check mark:

SQL Freelancer SQL Server Azure
A new SQL Server should be built in a few seconds! Click Manage at the bottom and a few firewall rules options may appear. Click Yes on all of them.

SQL Freelancer SQL Server Azure
Next, click on the server, and click Dashboard:

SQL Freelancer SQL Server Azure
On the right side of the screen you will see the full SQL Server name. In this example, the name is ns9rkrmwj9.database.windows.net. Write this name down, you’ll need it later.

SQL Freelancer SQL Server Azure
Now that we have a SQL Azure Server built, let’s move our databases.

Option 1: Using the Deploy Database to SQL Azure Wizard

In SQL Server 2012, there is a new wizard that will allow you to move an on premise database to SQL Azure. This is only available in SQL Server 2012 since SQL Azure was nonexistent in previous versions.

To use this wizard, open SQL Server Management Studio (SSMS) and connect to the server. Right click the database you want to move, click Tasks, Deploy Database to SQL Azure…

SQL Freelancer SQL Server Azure
Click here to view the rest of this post.

 

Move an On Premise SQL Server Database to the SQL Azure Cloud

Most of us have heard of SQL Azure, but a lot of people have yet to adopt the “cloud” version of SQL Server. This post will focus on how to move an on premise database to the SQL Azure and Windows Azure VM. To learn how to get started with SQL Azure visit Microsoft’s Azure site.

Most of us are used to the “Restore Database” command found by right clicking the Databases container in SQL Server Management Studio (SSMS). SQL Azure has done away with this and instead only gives you the options below:

On premise database Azure database

SQL Freelancer SQL Server Azure

SQL Freelancer SQL Server Azure

This isn’t very helpful and can make you want to deactivate your Azure subscription immediately, but hold on…there is a way.

First, you will need to create a storage account from Windows Azure. To do this, log in to Azure and click Storage, New from the left pane:

SQL Freelancer SQL Server Azure
Click Quick Create, Enter a URL and Location, and click Create Storage Account:

SQL Freelancer SQL Server Azure

Once the storage is created you should be able to view and manage it by clicking on the storage item on the left pane.

Click Manage Access Keys and take note of the Storage Account Name and Primary Access Key:

SQL Freelancer SQL Server AzureSQL Freelancer SQL Server Azure
Next click on the storage name and click Containers, Create a Container:
SQL Freelancer SQL Server AzureSQL Freelancer SQL Server Azure
Back in SSMS, right click on the database you want to move to the cloud and choose Tasks, Export Data-tier Application:

SQL Freelancer SQL Server Azure
Click Save to Windows Azure and the Connect…button.

SQL Freelancer SQL Server Azure
Click here to view the rest of this post.