SQL SERVER – Install Samples Database AdventureWorks for SQL Server

This post is out of date. The download links and the steps below belong to an older version of SQL Server. I keep one current guide for both sample databases, and I update that one instead of this page.

Install AdventureWorks and WideWorldImporters: Updated 2026

SQL server database installation.AdventureWorks is a Sample Database shipped with SQL Server and it can be downloaded from GitHub site. AdventureWorks has replaced Northwind and Pubs from the sample database in SQL Server 2005. The Microsoft team keeps updating the sample database as they release new versions. Here is how to install samples database AdventureWorks on your own machine.

Update: the instructions that work today are in the current guide, linked at the top and the bottom of this page.

You can download either of the data files and create a database using the same. Here is the script which demonstrates how to create sample database in SQL Server 2012.

Watch a quick video on the same subject.

Every new version of SQL Server should have its own Adventure Works database. The reason is that SQL Server comes up with new features with every version and most of the new features need a new dataset sample to demonstrate the capabilities of the features. This is the why every version of SQL Server has its own AdventureWorks database. SQL Server 2014 has many new features and to support that Microsoft has released new AdventureWorks 2014 Sample Database.

Please note that in SQL Server 2016 the same sample database is replaced by WideWorldImporters. You can read about that over here: Download and Install Sample Database WideWorldImporters

This database is a replacement of old sample database called AdventureWorks (Engine version) and AdventureWorksDW (Data Warehouse version).

Still need to install these databases? Everything above is kept for the record. The steps that work today, the current download links and the errors people actually hit are all on one page, and that is the page I keep up to date.

Install AdventureWorks and WideWorldImporters: Updated 2026

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

SQL Documentation, SQL Download, SQL Sample Database, SQL Server
Previous Post
What Is a View in SQL Server?
Next Post
SQL SERVER – TechEd India 2012 – Content, Speakers and a Lots of Fun

Related Posts

103 Comments. Leave new

  • its worked for me by doing this…, you just need to copy the downloaded data file to the data path (C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA) and run the Management Studio as Administrator. then right click on databases and click attach then click add button and click the copied file in c folder that is .mdf file and remove the log file below in that window and then click ok. it will newly created the log file thats it enjoy dudes..

    Reply
  • It’s very straightforward to find out any matter on net as compared to textbooks, as I found this piece of writing at this site.

    Reply
  • Msg 5133, Level 16, State 1, Line 1
    Directory lookup for the file “C:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLDATA
    AdventureWorks2012_Data.mdf” failed with the operating system error 123(The filename, directory name, or volume label syntax is incorrect.).

    i rightclick on mdf and full control is checked ,but still receiving same error ? any suggestion

    Reply
  • I had to copy downloaded file in directory where system databases are and then it worked (while in “downloads” dir it reported “… operating system error 5(Access is denied.)”

    Reply
  • After difficulty trying to download the file from another site, I found this site and your instructions and file worked like a charm. Many thanks!

    Reply
  • Hello Sir

    Am getting the below error while trying to create the database.

    File activation failure. The physical file name “C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf” may be incorrect.
    The log cannot be rebuilt when the primary file is read-only.
    Msg 1813, Level 16, State 2, Line 1
    Could not open new database ‘AdventureWorks2012’. CREATE DATABASE is aborted.

    Reply
  • Hi

    This link “AdventureWorks2012 Data File” at the top is not working.

    Mr B

    Reply
  • Thanks you Sir

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.