 <p>In my case what solved the problem was the folowing:</p> <pre><code>USE [master] GO CREATE DATABASE [AdventureWorks2008R2] ON ( FILENAME = 'C:\Program Files\Microsfot SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\AdventureWors2008R2_Data.mdf') FOR ATTACH_REBUILD_LOG </code></pre>