This project is read-only.

AdventureWorks Databases – 2012, 2008R2 and 2008

Rating:        Based on 35 ratings
Reviewed:  33 reviews
Downloads: 1091674
Released: Aug 28, 2012
Updated: Nov 3, 2017 by BarbKess
Dev status: Stable Help Icon

Recommended Download

example, 37158K, uploaded Aug 29, 2012 - 410448 downloads

Other Available Downloads

example, 1131K, uploaded Aug 29, 2012 - 66359 downloads
example, 36098K, uploaded Aug 29, 2012 - 295932 downloads
example, 1028K, uploaded Aug 29, 2012 - 79176 downloads
example, 58410K, uploaded Aug 29, 2012 - 190369 downloads
example, 1353K, uploaded Aug 29, 2012 - 49390 downloads

Release Notes

AdventureWorks downloads are available in the SQL Server Samples repository on GitHub .

Please update existing links to point to the GitHub release location. Downloads on this page are archived on Codeplex for your convenience only.

Release notes for downloads on this page:

About this release
This release consolidates AdventureWorks databases for SQL Server 2012, 2008R2 and 2008 versions to one page. Each zip file contains an mdf database file and ldf log file. This should make it easier to find and download AdventureWorks databases since all OLTP versions are on one page. There are no database schema changes.

For each release of the product, there is a light-weight and full version of the AdventureWorks sample database. The light-weight version is denoted by the LT abbreviation in the filename.

An AdventureWorks database can be installed by attaching the database, or using the CREATE DATABASE statement.

To attach an AdventureWorks database
  1. Download a database for your SQL Server version.
  2. Unzip the database (mdf) file and log (ldf) file.
  3. From Microsoft SQL Server Management Studio, connect to a SQL Server instance.
  4. Right click Databases.
  5. Click Attach.
  6. Click the Add button.
  7. Locate the AdventureWorks database mdf file. For instance, AdventureWorks2012_Data.mdf.
  8. Click the OK button on the Locate Database Files dialog window.
  9. Click the OK button on the Attach Databases dialog window to attach the database.
From SQL Server Management Studio, execute the following T-SQL:

Example T-SQL
CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'M:\Data\AdventureWorks2012_Data.mdf'), (FILENAME = 'L:\Tlogs\AdventureWorks2012_Log.ldf') FOR ATTACH;

Reviews for this release

Not sure what people are griping about...I had NO problem downloading or attaching the database. NO PROBLEM!!
by ansonee on Sep 20, 2013 at 8:08 PM
Only problem I encountered using SQL Server 2012Express (on Windows 8.1) was trying to attach the database I downloaded to my local drive (received error message similar to others in this review). Once I copied the database to a flash drive I was able to locate and attach with no problem at all. Great database - thanks!
by ValerieD on Nov 3, 2013 at 4:54 PM
Excellent!, Thanks!.
by jordenysp on Aug 23, 2013 at 2:19 PM
Not a problem at all. Attached to SQL server easily.
by Rajanand on Jul 13, 2013 at 2:56 PM
Sweet! Worked perfectly. I copied the files and simply used right-mouse-->Attach... to create the database. Thank you for supplying this and I feel sorry for those that feel the need to be bitter and cynical when this is a free service.
by pguidogl on Apr 5, 2013 at 2:11 PM
Was able to download and attach DB without any issues. Imported tables, and view. Play time!
by adeelsansari on Apr 4, 2013 at 6:26 PM
Very good!
by fcocastrojr on Sep 3, 2017 at 9:30 PM
This works fine. If you are being denied access on SQL server you need to run SQL Server as administrator and then you should have no problems.
by DavidLBanks on Jul 27, 2016 at 9:14 PM
Amazing Database! Thxs :)
by Leezhi on Dec 31, 2015 at 3:33 AM
Attached using SQL Sever 2012 on Windows Server 2012 (x64) with no problems.
by hagelt18 on May 8, 2015 at 8:05 PM
I needed some core tables for a new database. I was able to download and grab scripts for my new tables in great time! download, unzip,! Thanks guys!
by ElSmurfaDiablo on Mar 24, 2015 at 1:23 PM
Had trouble attaching this mdf file by following the "attach" instructions. Then I noticed a comment here that said "had same problem until I attached from a flash drive". I decided to try that and ... IT WORKED!
by dfjohnson504 on Mar 11, 2015 at 11:52 PM
Could not attach got this error The database 'AdventureWorks2012' cannot be opened because it is version 706. This server supports version 661 and earlier. A downgrade path is not supported. Could not open new database 'AdventureWorksLT2012'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948) Any help on this?
by Koechben on Aug 28, 2014 at 10:35 AM
I downloaded this code with reference from book - first edition of SQL Server Execution Plans Grant Fritchey. I downloaded AdventureWorks db from this link, But most of the scripts like below (mentioned in Chapter 2 under Table Join) are not running in that db because all the tables are missing under AdventureWorks database. SELECT e.[Title], a.[City], c.[LastName] + ', ' + c.[FirstName] AS EmployeeName FROM [HumanResources].[Employee] e JOIN [HumanResources].[EmployeeAddress] ed ON e.[EmployeeID] = ed.[EmployeeID] JOIN [Person].[Address] a ON [ed].[AddressID] = [a].[AddressID] JOIN [Person].[Contact] c ON e.[ContactID] = c.[ContactID]; I tried to download all versions of AdventureWorks database like 2012\2008R2 etc but no luck. Can you please help me to get the real sample code. I’ll really appreciate your help on this.
by Gaurav08 on Jun 4, 2014 at 8:46 PM
5 stars is rated
by mirzakashifzaman on May 7, 2014 at 2:57 PM
Terrific! So much easier to Attach with a provided log file.
by eugeneandres on Apr 26, 2014 at 7:51 PM
Instructions ran fine AFTER I launched SQL Server 2012 in Win7 as ADMINISTRATOR. Enjoy.
by DerekIT on Dec 13, 2013 at 4:40 PM
Great DB, matches all M$oft sample code, and was a snap to get loaded on Express 2008R2
by djonesii on Nov 27, 2013 at 3:46 PM
Anyone please provide me text file of script AdventureWorks2008 or 2008R2, i am unable to attach or restore the files downloaded from this page,, Kindly.
by razasyedcse on Sep 18, 2013 at 7:47 AM
Definitely a complete and very solid autoscaling solution! Great job!!
by travisbarker on Aug 27, 2013 at 10:47 AM
No problems at all dowloading and using the sample T-SQL code above to create the database.
by jhrozo on Jun 16, 2013 at 4:44 AM
There are many copies of these MDFs floating around and several steps to allow some of them to attach. With the 2008LT and 2012LT versions it was very easy to attach them to my named instance logging on as LocalSystem with Filestream enabled. Not sure all that was required, but I went through three attempts to get a test db installed fast. Thanks.
by ewascent on May 19, 2013 at 3:43 AM
I am not able to attach database AdventureWorks2008R2 with SQL Server 2008R2. It gives this error: The database 'AdventureWorks2008R2' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported. Could not open new database 'AdventureWorks2008R2'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948) Please help!
by Richagupta1985 on May 7, 2013 at 12:34 PM
Simple. Nice. Clean. Thank you
by KRob636 on May 4, 2013 at 9:39 PM
I downloaded the db for the article on DM the first example was executing a vTargetMail is not in this version. Plus the script error from the article. SELECT * FROM [AdventureWorksDW.[dbo.[vTargetMail I value this site but come on lets get the examples working.
by steve_witt on Apr 15, 2013 at 3:00 PM
Im using windows 7 32bit os. I have installed sql server 2008 release 2 for 32 bit os. when im trying to install the AdventureWorks 2008r2 and i attach the mdf file the following error is shown: 'AdventureWorks2008' cannot be opened because it is version 661. This server supports version 655 and earlier PLEASE HELP. URGENT IS THERE ANY VERSION FOR 32 BIT OS. HOW DO I ATTACH THE DATABASE????????
by arnesh on Apr 3, 2013 at 5:05 PM
The Data is crap. I have been trying to Develop a cube. They have changed the Database table names in AdventureWorks2008R2 Database . But the Cube that they provide is still based on old tables. I am not able to find the DW version of the data base found After so one whole day.
by vinodaggarwal87 on Feb 16, 2013 at 6:49 PM
3 stars since I have not tried 2008 and 2008R2. These mdf and ldf files worked as expected but the ones from your other site did not.
by 1mysorian2 on Jan 17, 2013 at 11:37 PM
by zns_91 on Oct 29, 2012 at 7:25 PM
Derrick - Can you please tell us what has changed in this release? Thanks.
by emerald77 on Aug 29, 2012 at 9:10 PM
I have to ask does any one test this stuff for accuracy. When I try to attach it says: CREATE DATABASE AdventureWorks2008R2 ON (FILENAME = 'F:\MSSQL10.SQL01\MSSQL\DATA\AdventureWorks2008R2_Data.mdf'), and 'R:\MSSQL10.SQL01\MSSQL\Data\AdventureWorks2008R2_log.ldf' are both primary files. A database can only have one primary file.
by klovefan4ever on Mar 7, 2013 at 4:40 AM
Your little code snippets are wrong! You have single-quotes at the END of each filename, but not at the beginning. You can even tell because what is in red is not right. Maybe if you weren't so dang abstract! Here's a clear example: CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'M:\Data\AdventureWorks2012_Data.mdf'), (FILENAME = 'L:\Tlogs\AdventureWorks2012_Log.ldf') FOR ATTACH;
by jpSQLDude2 on Oct 24, 2012 at 8:33 PM
The database 'AdventureWorks2008R2' cannot be opened because it is version 661. This server supports version 662 and earlier. A downgrade path is not supported. Could not open new database 'AdventureWorks2008R2'. CREATE DATABASE is aborted. (Microsoft SQL S
by shuggie on Nov 4, 2013 at 9:51 AM