SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restarting SQLServerAgent


Restarting SQLServerAgent

Author
Message
Eliyahu
Eliyahu
SSC-Addicted
SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)

Group: General Forum Members
Points: 435 Visits: 205
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?
RVSC48
RVSC48
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5082 Visits: 1759
I would start here - https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services
Sue_H
Sue_H
SSC-Dedicated
SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)

Group: General Forum Members
Points: 33158 Visits: 9413
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?


The permissions needed by the service accounts are listed in the following document:
Configure Windows Service Accounts and Permissions

Sue



Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (504K reputation)SSC Guru (504K reputation)SSC Guru (504K reputation)SSC Guru (504K reputation)SSC Guru (504K reputation)SSC Guru (504K reputation)SSC Guru (504K reputation)SSC Guru (504K reputation)

Group: General Forum Members
Points: 504120 Visits: 44223
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.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Eliyahu
Eliyahu
SSC-Addicted
SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)SSC-Addicted (435 reputation)

Group: General Forum Members
Points: 435 Visits: 205
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.

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search