Strange, I tried to attach the database AdventureWorks from this site - http://sqlserversamples.codeplex.com/

However, I encounter the following problem while attaching AdventureWorks2008R2_Data.mdf

Attach database failed for Server '{SERVER_NAME}{INSTANCE_NAME}'. (Microsoft.SqlServer.Smo)

Additional Information:

An Exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Directory Lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10.50.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Log.ldf" failed with the operating system error 3 (The system cannot find the path specified.). (Microsoft SQL Server, Error: 5133)

2 Answers 2


You need the "AdventureWorks2008R2_Log.ldf" file. And put it in this folder: "C:\Program Files\Microsoft SQL Server\MSSQL10.50.MSSQLSERVER\MSSQL\DATA\"

The easiest thing to do is download the "full backup" file from that site and then restore it, (instead of attaching.)


You need to have the file in the location mentioned by BOB above and as well I found that when you are trying to attach the Database, it's taking another log file into the "database details" dialogue box in the attach databases menu

You need to delete the log file which pops up along with the MDF file. This log file is from another database (in case if you are having Adventureworks2014 database as well)

The attach database then runs successfully without throwing any errors

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.