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;
Jon crowell
source share