In this step by step SQL Tutorial I will show you how to download and install Adventure Works DW 2012. For the purpose of this tutorial I will use SQL Server 2012.
Below you can see the Microsoft website path which you can use to download AdventureWorksDW 2012 click on yellow box
SQL Server 2012 DW.
NOTE: This may change in the future.
I go to the bottom of the page and click AdventureWorksDW 2012 data file link.
NOTE: DW is data warehouse, there is also operational (OLTP) database which is simply called AdventureWorks.
I downloaded the file on my computer and I see the file in Downloads folder.
NOTE: This may be different in your case.
I copy the MDF File and paste it into SQL Server Data folder.
Below you can see path that is usually the same for default installations and you can see my copied file.
MDF file is tha actual database file so instead of restoring the file we will ATTACH the database.
Connect to your instance of sql server. Right click databases folder and click Attach...
New window Attach Database is displayed now. I click on Add bottom.
From Locate Database Files window I select AdventureWorksDW 2012.mdf. Which is location where I previously copied the file.
Now my new database is selected so I click Ok.
I get error message saying " An error occurred when attaching the database(s). Click the hyperlink in the message column for details."
Below you can see that the second row which is log file has a "Not Found" in the message column. I highlighted the row and remove it using Remove button.
Once the Log file is deleted we can click OK button
The database has been attachedn now in Object Explorer I right click Databases folder and click Refresh.
My new database is added successfully.
I hope this step by step tutorial will help you to install adventure works datawarehouse 2012. If you have any questions about it you can
add a comment on our website