• The database is looking for the log file in the directory specified in the mdf file, not where you placed it.

    T-SQL

    USE [master]

    GO

    CREATE DATABASE [AdventureWorks2012] ON

    ( FILENAME = N'<Enter path to the mdf file here>\AdventureWorks2012_Data.mdf' )

    FOR ATTACH

    GO

    This will create a new ldf file in the default log file directory.

    Management Studio

    In the Attach Databases dialog box:

    Click the Add button and browse to the mdf file

    Click on the row that specifies the log file

    Click the Remove button

    Click OK