Where to download AdventureWorks2008.msi?

I would like to install AdventureWorks2008 (I just installed SQL Server 2008 R2 Express).

Every time I download the recommended version from CodePlex, all I get is the AdventureWorks2008.mdf file. Not only can I not attach the file from SQL Server Management Studio, but I can not copy / paste the file directly to the database.

I read in several places where I need to use AdventureWorks2008.msi , but I can not find where to download it.

I just can't figure out how to install AdventureWorks2008

thanks for the help

+7
source share
2 answers

There is no .msi file for adventureworks, although you will find it in outdated documentation and books. You are not alone in finding this confusing - it seems the website, files and steps that Microsoft provides to install these database changes every time I need to install them.

You need to create a database and attach the .mdf file, which is the "data file" specified in the instructions. (.mdf = primary data file, .ldf = log file, .ndf = secondary data file)

To attach a file, you need to carefully follow the steps here: http://social.technet.microsoft.com/wiki/contents/articles/3735.sql-server-samples-readme-en-us.aspx#Readme_for_Adventure_Works_Sample_Databases

Instructions for 2008R2:

To install the AdventureWorks2008R2 OLTP Database

  • Download the AdventureWorks2008R2 data file.

  • In the "File Download" section, click "Save" and navigate to the location on your local server.

  • In SQL Server Management Studio, run the following code:

Case insensitive database

 CREATE DATABASE AdventureWorks2008R2 ON (FILENAME = '{drive}:\{file path}\AdventureWorks2008R2_Data.mdf') FOR ATTACH_REBUILD_LOG; 

As an alternative to step 3, you can attach the database using the SQL Server Management Studio user interface. For more detailed information, see Attach Database (SQL Server Management Studio) .

Note. You must remove the log file from the list of files to attach. This will force the operation to rebuild the log.

Aaron Bertrand Headache Recovery Board:

You must place the mdf file in your regular data folder - SQL Server will already have the appropriate permissions. You can get this path using

SELECT TOP (1) physical_name FROM master.sys.database_files;

+9
source

You can directly paste this file into the database directory. For more information, you can refer to http://tryingmicrosoft.com/error-while-attaching-a-database-to-sql-server-2008-r2/ .

+4
source

All Articles