Coffee, smoke and techilicious burps at 3.47 AM

Some half baked ideas by Nilotpal about Tao, Zen and the art of converting coffee into code...

Downloading and installing AdventureWorks Database

I am assuming that you want to write a prototype of some sort for which you want a sample database to work with. And I am assuming that you don't have AdventureWorks on your machine. Putting down quick set of steps:

  1. Go to http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004
  2. Click on AdventureWorksDB.mdi, in case you are looking for the AdventureWorks Database for SQL Server 2005. there are also other sample databases available. This post is specifically for the AdventureWorks database for SQL Server 2005
  3. Accept the Agreement
  4. Download and run the installable.
  5. Open Visual Studio Command Prompt.
  6. Type in SQLCMD and press enter
  7. Type in the command
    "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'"
  8. Please note that the Drive could be either C:\ or D:\ depending upon where you have installed the AdventureWorks Database MSI.

 

This will attach the AdventureWorks database. Fire up SQL Server Management Studio and confirm whether Adventure Works exists or not.

Published Wednesday, November 19, 2008 3:21 PM by nilomo

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker