For a NUnit test I need to reference a .mdf file from a .config file. Unfortunately, I get the following error message:
The FOR ATTACH option requires that at least the primary file be specified.
An attempt to attach an auto-named database for file
C:\....\*.mdf
A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I looked for this error on google but didn’t find anything that helped me solve my problem.
Any idea?
Thank you
Edit
Apparently the .log file is missing.
Yeah, as snippy as it sounds:
A database with the same name may already exist (database name possibly != file name).
The specified file may not be something SQL Server has access to
Is the file unique and not bound to the server at the same time (like from another unit test)? Does the SQL Server service account have access to the file?