This project is read-only.

Adventure Works for Azure SQL Database

Rating:        Based on 19 ratings
Reviewed:  19 reviews
Downloads: 64687
Released: Dec 7, 2012
Updated: Dec 8, 2012 by scottkl
Dev status: Stable Help Icon

Recommended Download

Source Code AdventureWorks2012ForWindowsAzureSQLDatabase
source code, 20883K, uploaded Dec 8, 2012 - 25046 downloads

Other Available Downloads

Source Code
source code, 10811K, uploaded Dec 16, 2009 - 39641 downloads

Release Notes

AdventureWorks Community Samples Databases for Azure SQL Database


Cloud computing on the Azure platform offers the opportunity to easily add more data and compute capacity on the fly as business needs vary over time. Azure SQL Database is the relational data store for the Windows Azure platform. Although SQL Server and Azure SQL Database both communicate with clients via TDS, there are significant differences between SQL Server and Azure SQL Database. So the familiar AdventureWorks community sample database scripts will not work if executed against Azure SQL Database without modification.


In order to install the AdventureWorks community sample databases into an Azure SQL Database server you will need the following:
  1. An Azure SQL Database server at
  2. .NET Framework 4.0 which is available for free at MSDN.
  3. Ensure that you have configured your Azure SQL Database Firewall to allow a connection to your Azure SQL Database server from your IP address.

SQL Server is not required in order to install the sample databases. However SQL Server Management Studio of SQL Server 2012 may be helpful for browsing and exploring Azure SQL databases.


If you have not already done so, download and extract the files from the zip file containing the AdventureWorks community sample databases for Azure SQL Database from CodePlex.

To install the Azure SQL Database version of the AdventureWorks2012 database:
  1. Delete a previous AdventureWorks2012 sample database.
  2. Start a command prompt window with Administrator privileges.
  3. CD to the directory where the zip file was extracted.
  4. CD to the AdventureWorks\ directory.
  5. At the command prompt:

CreateAdventureWorksForSQLAzure.cmd servername username password

For example, if the assigned SQL Azure server is named b1gl33p, the administrator user name is Fred, and the password is Secret, the following would be typed:

CreateAdventureWorksForSQLAzure.cmd Fred@b1gl33p Secret

The script will create the database, install the schema, and populate the database with sample data.

Reviews for this release

SQL utility bcp is required for bulk operations in the script. Make sure it is included in your PATH --> C:\Program Files\Microsoft SQL Server\110\Tools\Binn in my VM.
by MarioGarcia71 on May 1, 2015 at 5:49 PM
Worked like a charm for me! Used Windows 8.1 and our Azure account. Just downloaded, uzipped and followed the instructions. Script took a few mins but worked the first time.
by TysonNavarre on Apr 22, 2015 at 8:30 PM
Sorry - bad experience for me "executeSQL has stopped working" & an exception. Named Pipes can't make a connection??? no idea why it is trying to use named pipes to Azure!! Win 8.1 64 bit - GGrrrr Ended up Creating the DB manually, running the schema.sql manually from the Azure portal. Then ran the BCP commands from the cmd file successfully to import the .dat files. Annoying - looks like the executesql.exe needs a bit of work but at least I got there in the end!
by sinisterPenguin on Dec 5, 2014 at 11:09 PM
The instructions above don't work as of Sept/2013 and need to be updated. Refer to the ReadMe file within the zip file for steps to install database on Azure SQL Database
by mvark on Sep 5, 2013 at 1:48 PM
Very Fun, Powerfull and very good for start. Thanks a lot...
by travisbarker on Aug 27, 2013 at 10:38 AM
Fails when run on Windows 8 error message suggests failed log in even when using <user name>@<guid>. Solved! Password ended with a ; which was messing with the script. Changed to another character and script ran without problems.
by nbowling on Jun 20, 2013 at 3:34 PM
Here is a tip for windows 8 users! thanks to Joanne Hendrickson who figured this out. The following syntax worked for her: CreateAdventureWorksForSQLAzure.cmd <serverGUID> <sqllogin>@<serverGUID> <password> The key was specifying username@servername instead of just username.
by Heidist on Apr 30, 2013 at 10:28 PM
Just curious, why isn't the DB available in BACPAC format? Wouldn't it be easier to import instead of using CreateAdventureWorksForSQLAzure.cmd script?
by alibad on Dec 23, 2012 at 5:56 AM
Create scripts fail on Windows 8
by superlatch on Nov 14, 2012 at 10:50 PM
Excellent downloads.
by egamesu on Oct 24, 2012 at 1:08 AM
The SalesOrderHeader.SalesOrderID primary key does not line up with the SalesOrderDetail.SalesOrderID
by jao28 on Aug 30, 2012 at 4:45 PM
ProductID values in table Sales.SpecialOfferProduct don't match ProductID in Production.Product table !
by nlips on Aug 11, 2012 at 8:48 AM
Anytime I try to run the CreateAdventureWorksForSQLAzure.cmd command, I get all kinds of error messages as well as the ExecuteSQL has stopped working, and I have to close the program. It happens when the script file is trying to populate various fields (ie bcp is not recognized as an internal or external command" when trying to populate Production.ProductProductPhoto and other Production fields.
by holly_westell on Aug 7, 2012 at 8:59 PM
Worked well for me. Note - novice user so havent given it a thorough going over however uploader just works as advertised. Thank you!! Should be released to GitHub as well minus one star for the issue below one thing I would fix though is that the cmd file doesnt behave well with a /? argument. This is must for every batch file
by arunsun on Jul 5, 2012 at 1:18 AM
I just installed the database on Azure, and there's a basic bug in it. Run the query below and you'll see. select SalesOrderId from sales.salesorderdetail od where od.SalesOrderId in (select SalesOrderId from Sales.SalesOrderheader oh)
by JoeLax on Jun 3, 2012 at 4:42 PM
Help full doc.
by ahsan_kabir_shuvo on Apr 10, 2012 at 6:14 PM
Very Helpful... Thanks
by Robotsushi on Jun 1, 2011 at 8:50 PM
by subhash6006 on Sep 6, 2010 at 12:00 PM
this is good
by xman007xman on May 24, 2010 at 3:23 PM