Installing the AdventureWorks Database with SQL Server 2012

My newest gig requires more day-to-day work with Microsoft SQL Server. In fact, I was told there'd be more SQL than C# involved in this job. I do pretty well with SQL but I figure it wouldn't hurt to reinforce the basics and learn some new tricks. Plus, I want to play in-depth with SQL Server Integration Services (SSIS), SQL Server Reporting Services (SSRS), and SQL Server Data Services (SSDS).

Nearly every tutorial out there uses the Northwinds database or the AdventureWorks database. AdventureWorks is pretty easy to install, so it's a good warm up exercise before we get into dealing with Northwinds.

Follow the steps below to obtain and install the AdventureWorks database.
  1. Open a web browser and go to http://msftdbprodsamples.codeplex.com/
  2. Click on the link "AdventureWorks Databases – 2008, 2008R2 and 2012" (http://msftdbprodsamples.codeplex.com/releases/view/93587). You'll be taken to the following page:
  3. Decide which version of the AdventureWorks database you wish to download. I chose the first option, AdventureWorks2012_Database.zip, which was the recommended option. Click on the file to download it.
  4. Unzip the file:
  5. If you didn't unzip the files to the SQL Server data directory, then copy the files from where you did unzip them to the SQL Server data directory. In my case, the data directory can be found at
    C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA
  6. Launch SQL Server Management Studio.
  7. Right-click on the Databases folder under the server you to which you wish to attach the database. Select "Attach..." from the popup menu.
  8. The system will display the "Attach Databases"dialog box:
  9. Click the "Add..." button and select the AdventureWorks database. Click the "OK" button.
  10. You'll be returned to the "Attach Database" dialog box. You'll see the AdventureWorks database listed:
  11. Click the "OK" button.
  12. The database is now listed:
Voila! You now have your own copy of the AdventureWorks database.

Note: The link above is for the AdventureWorks 2014 Sample Database (which, as far as I tell, works alright with SQL Server 2012). If you want the AdventureWorks 2012 Sample Database -- which is specifically for 2012, 2008 R2, and 2008 -- then you should go to http://msftdbprodsamples.codeplex.com/releases/view/93587.

Comments

Popular posts from this blog

Using Reference Aliases

List of Visual Studio Keyboard Shortcuts

Quick Example of System.IO.Abstractions Use