Home Forums SQL Server 2005 Backups Operating System error 5(Access is Denied) RE: Operating System error 5(Access is Denied)

  • habeeb.matrix (10/17/2012)


    I had this issue and all the solutions online was kind of misleading to my issue. I have the solution here.

    http://dotnet-programming-solutions.blogspot.com/2012/10/attach-database-encountered-operating.html

    The solution was to Run SSMS as Administrator.

    I'm not sure why you were trying to give full rights to NETWORK SERVICE since you we're trying to attach a database as a logged on user. The user you were logged on as needed full rights to "C:\testApp\App_Data\MyDB.mdf" not NETWORK SERVICE.

    I'm glad you found a work around for your situation. But for those having the "Error 5" issue via the running SQL service might need to resolve the file permission issue.