locked
Agent Won't Start RRS feed

  • Question

  • I have been looking over the forums trying to find a solution to this with no luck yet. 

    Looks like a permission issue but I can't see why it isn't working -_-. This was working previously. 

    2020-07-06 10:33:17 - ? [100] Microsoft SQLServerAgent version 11.0.7001.0 (X64 unicode retail build) : Process ID 900
    2020-07-06 10:33:17 - ? [495] The SQL Server Agent startup service account is Domain\user$.
    2020-07-06 10:33:17 - ? [393] Waiting for SQL Server to recover database 'msdb'...
    2020-07-06 10:33:17 - ! [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_update_agent_xps', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (DisableAgentXPs)
    2020-07-06 10:33:17 - ! [000] The EXECUTE permission was denied on the object 'sp_sqlagent_update_agent_xps', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (Error 229)
    2020-07-06 10:33:17 - ! [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_update_agent_xps', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (DisableAgentXPs)
    2020-07-06 10:33:17 - ! [000] The EXECUTE permission was denied on the object 'sp_sqlagent_update_agent_xps', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (Error 229)
    2020-07-06 10:33:17 - ? [098] SQLServerAgent terminated (normally)

    Monday, July 6, 2020 12:41 AM

Answers

  • Hi MIAOYUXI,

    This didn't fix it, however it did put me on the right track to getting it resolved. 

    Looking at the service directly, I changed it from local system account. To the domain account and now it starts fine. 

    What I would like to know for future reference is which one in SQL relates to the local system one. 

    • Marked as answer by Scylon Tuesday, July 7, 2020 1:40 AM
    Monday, July 6, 2020 3:48 AM

All replies

  • Hi,

    Adding your domain\user to login, and then add it to sysadmin role,and then restart the SQL Server Agent Service.



    Note:
    The problem is that the Windows (Local or Domain) account that you use to run SQL Server Agent service is not a “sysadmin” Fixed Server Role member in the corresponding SQL Server Instance.

    Using SQL Server Configuration Manager or Services.msc, you can find which account is being used for the SQL Server Agent service.For this account, make sure that there is a login in the SQL Server instance to which this SQL Server Agent belongs. And make sure that this login is also a member of the sysadmin Fixed server role. 
    After you authorize it, you can try to run the SQL Server Agent service again.

    Helpful information:the-execute-permission-was-denied-on-the-object-sp_sqlagent_update_agent_xps-database-msdb-schema-dbo

    BR,

    MIAOYUXI

    Monday, July 6, 2020 3:15 AM
  • Hi MIAOYUXI,

    This didn't fix it, however it did put me on the right track to getting it resolved. 

    Looking at the service directly, I changed it from local system account. To the domain account and now it starts fine. 

    What I would like to know for future reference is which one in SQL relates to the local system one. 

    • Marked as answer by Scylon Tuesday, July 7, 2020 1:40 AM
    Monday, July 6, 2020 3:48 AM
  • Hi Scylon,

    Glad to hear that the issue is solved.

    Local System account. The name of this account is NT AUTHORITY\System. It is a powerful account that has unrestricted access to all local system resources. It is a member of the Windows Administrators group on the local computer, and is therefore a member of the SQL Server sysadmin fixed server role.

    http://technet.microsoft.com/en-us/library/ms191543(v=sql.110).aspx

    Helpful case: nt-authoritysystem-vs-localsystem


    You can choose to "Mark As Answer" for the helpful reply,this will be benefit for others.


    BR,

    MIAOYUXI


    Monday, July 6, 2020 7:01 AM
  • Hi Scylon,

    You have already solve the issue,and you can choose to "Mark As Answer" for the helpful reply and this will cose this case and will benefit fot others.

    BR,

    MIAOYUXI

    Tuesday, July 7, 2020 1:35 AM