Today, when attaching the database error message: Unable to open the physical file Xxx.mdf ", operating system error 5:" 5 (Access denied.) "Error message (is not the remote server database attached to the read-only situation, can also be resolved??) , tested, this is the case, but the user is remote, change to Full control allow)
First of all, my database installation root directory and the attached database is not the same directory, when the database is installed in the root directory is the default, the directory under the C disk, and I want to attach the database directory for the e-disk, so:
Solution one: Log in with your Windows account and port the attached database to the root directory.
Then complete the attach.
Solution Two:
Log in with Windows account, then will be attached to the database under the E-disk, change the permissions, select the. mdf file-----Right-click-----security------Authenticated Users----Edit----security control allowed, specific into, and then, Follow the same method, change the log file, and then attach the database to both.