none
SQL agent problem

    Question

  • I have a cluster service sql server agent. won't able to startup. 

    in failed over manager/services/ or even in sql server configuration manager also can't start.

    there is no SQLAGENT.out

    sql server and sql agent using the same domain account to startup, only sql server can start, sql agent cant'.

    Monday, November 28, 2016 4:44 AM

Answers

  • finally got what's the problem. 

    someone incorrectly set the eventlog permission. after fixing the eventlog permission. SQL agent start again

    • Marked as answer by sakurai_db Wednesday, November 30, 2016 2:25 AM
    Wednesday, November 30, 2016 2:25 AM

All replies

  • Hi,

    Make sure you try to bring it's corresponding cluster resource online from Cluster Manager and do not start as service from services.msc. In case of cluster all resources need to managed from cluster manager there you can go to cluster manager and look for SQL Server Agent resource, right click on it and bring it Online. (Note is can still fail but at least that is that correct way to bring it online)

    Let me know if any issue..


    Kindly mark the reply as answer if they help

    Monday, November 28, 2016 4:53 AM
  • SQL Agent service account must have Read/Write permission to the file SQLAGENT.OUT.  If the permission is denied, SQL Agent will fail to start; a new log file SQLAGENT.OUT will not be and cannot be generated. 

    you can check the security settings on the directory “.\Log” where SQLAGENT.OUT is generated.   The security setting must contain Agent user group for the permission of Read/Write.

    Monday, November 28, 2016 5:13 AM
  • i have check the permission. and tried to rename SQLAGENT.OUT. Also can't start.

    and SQL server can generate errorlog.log ..  the sql server service also using the same domain account.

    Monday, November 28, 2016 5:18 AM
  • errorlog and sqlagent.out are in the same directory
    Monday, November 28, 2016 5:18 AM
  • is it happens on both nodes ?

    Can you please check the following registry values on both nodes 

    HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.0.339.MSSQLSERVER\SQLServerAgent\ErrorLogFile


    • Edited by ShabSQL Monday, November 28, 2016 5:41 AM
    Monday, November 28, 2016 5:37 AM
  • It happen on both nodes. 

    and the registry is the same on both nodes.

    Monday, November 28, 2016 6:02 AM
  • Is the both node having same value for this registry key ErrorLogFile.  

    for eg: D:\Microsoft SQL Server\MSSQL\Log\SQLAGENT.OUT

    If not please add your logfile location to this entry and try to start the agent. 


    • Edited by ShabSQL Monday, November 28, 2016 6:11 AM
    Monday, November 28, 2016 6:10 AM
  • yes it's the same values
    Monday, November 28, 2016 6:45 AM
  • any idea ?
    Monday, November 28, 2016 8:06 AM
  • anyone has the idea ?
    Monday, November 28, 2016 1:39 PM
  • helped. The agent is still down. I need some idea 
    Tuesday, November 29, 2016 2:12 AM
  • sql agent need to write an 101 event to windows eventlog, in order to start?

    Tuesday, November 29, 2016 7:06 AM
  • Hi sakurai_db,

    >>sql agent need to write an 101 event to windows eventlog, in order to start?

    No, this only happens after SQL Server Agent has successfully started. Since you have mentioned SQLAGENT.OUT was never generated, could you please go to Event Viewer\Windows logs\Application and see if there is any event with event id 324(and the source should be either SQLSERVERAGENT for default instance, SQLAGENT$INSTANCENAME for named instance) and share the result here? 

    If you have any other questions, please let me know.

    Regards,
    Lin

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 29, 2016 10:10 AM
    Moderator
  • finally got what's the problem. 

    someone incorrectly set the eventlog permission. after fixing the eventlog permission. SQL agent start again

    • Marked as answer by sakurai_db Wednesday, November 30, 2016 2:25 AM
    Wednesday, November 30, 2016 2:25 AM