• Jeff Moden - Wednesday, January 3, 2018 8:12 AM

    Eliyahu - Wednesday, January 3, 2018 7:23 AM

    Since I have jobs and stored procedures that need to write to network locations, I run both SQL Server and SQL Server Agent under local Windows accounts. I entered the accounts in the Configuration Manager letting it to set up all the security. The only problem I have is that the SQLServerAgents sometimes terminates unexpectedly and the SQLServerAgent Monitor fails to restart it. This is the error in the Windows Event Log:

    SQLServerAgent Monitor failed to restart SQLServerAgent after SQLServerAgent terminated unexpectedly (reason: SQLSCMControl() returned error 5, 'Access is denied.').

    I set up the agent recovery in Windows Services, but I still prefer it to be done between the SQL Server and the Agent.

    I suspect the SQL Server account is missing some Windows permissions. What permissions shall I check/add?

    To be honest, you're working on the wrong problem.  You need to find out what and who is causing the "Access Denied" errors because it could be illegal attempts to access data.  The SQLAgent is trying to protect you and you're trying to override that protection.

    I understood that the "Access is denied" is the reason why the SQLServerAgent Monitor failed to restart the SQLServerAgent. It doesn't come from the agent. The agent is lying dead at that time.