System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)'

Answered System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)'

All Replies

  • Thursday, September 11, 2008 5:24 AM
    Moderator
     
     Answered

     

    By the error message it seems that  the account used to restore the database doesn't have privileges to write the files on specified path 'D:\Empty_umis\umis_demo'
  • Wednesday, June 24, 2009 10:43 AM
     
     
    Hi Mangel, I am using my admin account to restore the database from the backup file. But i am unable to do so. Previously on the same server i had restored dbases from backups. Not sure whats going wrong.
    When it coems to permissions...what do we need to check? PLEASE advice.
  • Wednesday, June 24, 2009 11:13 AM
    Moderator
     
     
    It is the service account for the database engine which is relevant. And note the folder in that error message. This is probably where it want to place any of the database files (can be specfied using the MOVE option of the restore command).
    Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi