Thursday, May 10, 2012 8:32 PM
hi i'm working with a vb.net project that works with a sql server database the database is currently not located in the program file i would like to transfer the mdf file to the vb project but when i transfer it i can not attach it to the server
i tried to open it by click the file and open with sql and it returned a error i tried with attaching with management studio but the three does not open till this file i don't know why
i tried the following command
and i got the following errorMsg 5133, Level 16, State 1, Line 1
Directory lookup for the file "my file path" failed with the operating system error 5(Access is denied.).
Thursday, May 10, 2012 9:38 PMAnswerer
The reason it is failing is because of a windows permissions issue with the service account of SQL Server. In the error message, at the end you'll see it failed because the access to the file was denied by the OS. Give the correct windows level permissions (Read, write, list contents, execute) on the folders and files and try it again. The correct permissions are needed on both the files and folder for the current location as well as the new location. The permissions should be given to the database engine service account.
Sean Gallardy, MCC | Blog
Monday, May 14, 2012 10:07 AM
Hi could you please check this, it may help you out.