The error I received.
Attach database failed for Server 'COMPUTERNAME\SQLEXPRESS'. (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:\Data\WebHelp\help_log.ldf" failed with the operating system error 2 (The system cannot find the file specified.). (Microsoft SQL Server, Error: 5133)
This error occurred for me when I tried to attach and SQL Server was looking for an existing log file (.ldf). I was able to get around this by doing the following.
Opened up SQL Server Management Studio Express. Browsed to my database (.mdf) file. Once I set the file name to attach I selected the log file that was listed below the database file, and clicked the Remove button located just above the Cancel button. |