The sample databases for SQL Server 2012 haven’t been completely finalized, but I was able to find the latest version here for AdventureWorks. This download gives you an mdf, and that’s it. You can’t directly attach that in SSMS, but you can use T-SQL to do it.
CREATE DATABASE ADVENTUREWORKS
ON (FILENAME = ‘c:\SQLdata\ADventureWorks2008R2_data.mdf’)
FOR ATTACH_REBUILD_LOG
You get a note that the log file is invalid from the MDF, but a new log is created and you have your sample databases attached.
Filed under: Blog Tagged: sql server, syndicated