Search This Blog

How to Install the AdventureWorks 2012 Sample Database

To use the examples in this blog you will need to download and install the Adventureworks 2012 database.  You can download it from:

http://msftdbprodsamples.codeplex.com/releases/view/55330

To attach Adventureworks 2012:

Place the AdventureWorks2012_Data.mdf file into the folder where you store your databases.  This can be a folder you created or you can use the default folder which is :

C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA

If you gave your instance a name when you installed it then there will be a folder for your instance name.

Once you have copied the file over you can ATTACH the database:


  • Open SQL Server Management Studio
  • In the Object Explorer right click on the Databases Node
  • Select Attach, you will get a dialog box like this:

  •  Click the Add button, browse to the location you put the AdventureWorks2012.mdf file, select it and then click ok
  • You now need to remove the missing log file entry from the "AdventureWorks2012" database details

  • Click on the log file and then click the remove button
  • Next click ok
You should now be able to see the AdventureWorks2012 database listed under the Databases node in Management Studio. If you can't see it right click on the Databases node and select Refresh.

No comments:

Post a Comment