This article will show  how to set up the Adventure-works database using the Microsoft Azure Cloud.


In the coming section we will see how amazingly easy it is to get the Adventureworks db running on Microsoft Azure. Keep in mind that the process that I am going to describe replaces all of these tasks:
  • Providing a virtual or physical machine
  • Downloading an SQL Server Installer
  • Organizing a License
  • Installing the SQL Server
  • Configuring the SQL Server
  • Downloading and Installing Adventureworks

Running Adventureworks on Microsoft Azure SQL

The following tutorial is divided into four parts:

  1. Prerequisites 
  2. Provisioning an Azure SQL Database Server.
  3. Getting and Deploying the Scripts
  4. Verifying the Installation

Let’s get started:

Step 1: The Prerequisites

You need 3 things in order to reproduce this example:

1. A Microsoft Azure Subscription. If you do not have one, you can get a free trial subscription for one month and 200 CHF at:

2. A computer with an installation of the .NET framework in version 4. If you run Windows 8, you are set. If you run an earlier version and .NET 4.0 is not installed, you can get it at the Microsoft Download Center:

3. The Azure db must be accessible from your client computer. This is a configuration setting in the Azure Management Dashboard. Details can be found below. Note that currently there are two Azure Portals. The old one under and the new one under For simplicity, I am going to use the old one.

Step 2: Provisioning an Azure SQL Database Server (Old Portal/

After you have created your Microsoft Azure account, go to the management portal: and log in.

On the portal, select SQL DATABASES from the navigation on the left hand side:


Once you are on the SQL DATABASES page, click SERVERS on the top navigation:


Finally, click the ADD button at the bottom:


The CREATE SERVER wizard will pop up, fill in the fields and confirm. Select a region that is close to your location.


After some time, it took about 30 seconds for me, your database server is ready to go! Click the little arrow on the right of the server name to proceed to the server settings:


On the following page, click CONFIGURE and then click the arrow on the right, where it says “ADD TO THE ALLOWED IP ADDRESSES”. This configuration is vital since it allows your local machine, where the browser is running, to access the database server. IMPORTANT: Do not forget to hit the save button, once completed!


Note the server name and the credentials that you specified and we can go on with the next step. Alternatively, you can navigate to the DASHBOARD page and copy the MANAGE URL from there.

Step 3: Getting and deploying the scripts

Navigate to and download the “AdventureWorks2012ForWindowsAzureSqlDatabase” file. Save and extract the zip file.

Open a CMD prompt with administrative privileges and navigate to the directory where you unzipped the package and there into the \AdventureWorks directory.

Enter the following command:

CreateAdventureWorksForSqlAzure.cmd <servername> <username> <password>

Important Hints!

Make sure you enter the name as “username@servername”. Providing the username only can lead to problems during the installation. Additionally, you have to use the full server name, as in:


CreateAdventureWorksForSqlAzure.cmd mypassword


After roughly 5 minutes, the script should show “Installation Completed”. That’s it, your database is up and running.

Step 4: Verifying the installation

You can use any SQL Server tool, such as Visual Studio or the SQL Server Management Studio to connect to your DB and verify that the data is there. I would like to show a very simple approach using SqlCmd.exe. SqlCmd is shipped with Visual Studio and the easiest way to use sqlcmd.exe is by using the Visual Studio Command Prompt. Run the following command inside the VS command prompt:

sqlcmd.exe –S <servername> –d <db name> –U <username> –q <query>

or, in our case:

sqlcmd.exe –S –d AdventureWorks2012 –U mme@zvnhp88skk –q “select top 10 firstname, lastname from person.person”

If you see 10 records that contain names, the data is there and we are done!

Important hint: Always keep in mind that Microsoft Azure is based on a pay-as-you go policy and you will be charged on a per-minute base for your database instance! If you don’t need it, shut it down!


As we can learn from this article, it is really easy to get your personal copy of the Adventureworks database running. Thanks to the cloud, provisioning a full database server is only a matter of a few mouse clicks. I think this is amazing!