Friday, April 25, 2008

AdventureWorks Database

Tips on installing AdventureWorksDW for the analysis tutorial for SQL 2005:
1) Download the file at: (No longer at downloaded at Microsoft)
2) Select the AdventureWorksBI.msi (This is the database for the ssas tutorials).
3) Run the msi installer that you just downloaded, default installation is fine.
4) The msi installer for the sql 2005 Adventure Works database does not automatically attach the database files to a SQL Instance. There are multiple ways of accomplishing this:
a) Open Sql Managment Studio, New Query, Copy the text below (If you made any changes to the install location, or the drive is not on C, then make the appropriate changes in the file names. Just search for AdventureWorks if you're not sure of the file location)

exec sp_attach_db @dbname = N'AdventureWorks',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'


b) Connect to the SQL Server Instance that you would like to install the AdventureWorks database. Right click the database folder and select "Attach...". This will bring up a SQL Server Attach Databases Dialog. Click the Add button and locate the AdventureWorks_Data.mdf file.

Basically it's really easy, you need to know that the msi file does not automatically attach the database.

No comments: