asp If I run this, I get essentially the same messages:įile activation failure. ( FILENAME = N 'D:\SQLServer\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Data.mdf' )įont-family: consolas, “Courier New”, courier, monospace However removing the log file and pressing the click button gives me this code: USE If you select the log file in the lower dialog, and click Remove, you can use the GUI here. The error occurred because the log file didn’t exist.
If you use the GUI, please click the “script” button instead and cancel out of the dialog. I’ve even seen people click “Cancel” without realizing there was an error”. If there’s an error, it can be hard to figure out what happened, and the error handling in SSMS isn’t the greatest.
Once I pick my MDF, I see the dialog populated.ĭon’t click OK for precisely this reason. If I go into SSMS, I can pick the “Attach” dialog by right clicking the “databases” folder. I know I’ve done this before, but I had to stop and look things up, which means that I should blog about it ( hint, hint). I had to go through this recently when I downloaded the AdventureWorks2008R2 database, which was just an MDF file. Attaching an MDF file without an LDF file can be a little tricky.