Thursday, August 2, 2012

Attach AdventureWorks 2012

Quick and easy, but I see people in forums are asking about it...
You may download the .MDF file from here: http://msftdbprodsamples.codeplex.com/releases/view/55330
I'd typically download and save it with the rest of the data files, maybe at the default location or any other drive if you prefer.

The default location would be:
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA

Then, right click on your DATABASES under your server name and select ATTACH


Then you'll get the following screen, where you would normally navigate to the download directory and select the advntureworks2012.mdf file.


After you click on OK, you will see that the log file is missing and SQL server will display "Not Found", just highlight the log file and click on remove, then OK.


You're done!! attached ans ready for testing...