SQL Agent and permissions to write to folder

  • Hello all,

    I see that a recent related message was posted about built-in accounts.

    Anyway, a vendor set up system using SQL 2014. The SQL Server Agent service was running under the 'Local System Account'.

    Agent jobs were failing because they couldn't write to a shared folder on the same server. I decided to change the account to a regular privileged domain user. Here is the error message:

    Executed as user MYDOMAIN\SQL2014Agent Cannot open backup device 'E\backup\MyBackup' Operating system error 5(Access is denied). [SQLSTATE 42000] [Error 3201] BACKUP DATABASE is terminating abnormally [SQLSTATE 42000] [Error 3013]. The step failed

    I granted Full Control to that domain user and it still failed. I added 'Everyone' and gave it Full Control and it succeeded.

    I understand that the account under which the Agent is running should have Write permissions on the share. However, I must have missed something. The only way I can get this to work is to grant Write or Full Control to Everyone. I absolutely do not want to do that.

    Thank you.

  • Sounds strange, do you use the same account to run the SQL instance that you use to run the AGENT? Have you tried granting the SQL service account access to the backup folder too?

    It sounds like the correct user has not been granted access, and that is why when you grant 'Everyone' access it starts working.

  • The backup operation may be launched by a SQL Agent job, put it's performed by SQL Server itself. So, SQL Server service account must have the permissions on the backup destination folder.

  • if this is the actual path then you have a typo in it that it couldn't find it. E[highlight=#ffff11]:[/highlight]\backup\MyBackup

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply