I want to be able to look at a .mdf before trying to attach it and determine if it will be possible to attach it without it’s .ldf (this can be done if it was detached correctly).
Currently, I am trying to attach the .mdf and if it was detached incorrectly and needs the .ldf to reattach it will give an error message that isn’t very helpful to our user. I’d like to be able to give them a better error message.
You should only need the MDF file, but it changes the process.
This thread should sort you out.