none
Microsoft SQL Server Error: 22022

    Question

  • When trying to run a maintenance job I receive the error "SQLServerAgent is not currently running so it cannot be notified of this action. (Microsoft SQL Server, Error: 22022)". The agent starts and then stops. What would cause this?
    Monday, December 9, 2013 6:47 PM

Answers

All replies

  • Please see the SQLAGENT.OUT in the LOG directory for the reason Agent is not running. 

    Monday, December 9, 2013 6:50 PM
    Moderator
  • I rebooted like it says below but was trying to run the job before and after. I tried manually starting the agent a few times too.

    2013-11-26 19:59:18 - ? [100] Microsoft SQLServerAgent version 11.0.3128.0 (X64 unicode retail build) : Process ID 4676
    2013-11-26 19:59:18 - ? [495] The SQL Server Agent startup service account is NT Service\SQLSERVERAGENT.
    2013-11-26 19:59:18 - ? [393] Waiting for SQL Server to recover database 'msdb'...
    2013-11-26 19:59:18 - ? [000] 
    2013-11-26 19:59:18 - ? [101] SQL Server SERVER version 11.00.3128 (0 connection limit)
    2013-11-26 19:59:18 - ? [102] SQL Server ODBC driver version 11.00.3000
    2013-11-26 19:59:18 - ? [103] NetLib being used by driver is DBNETLIB; Local host server is 
    2013-11-26 19:59:18 - ? [310] 4 processor(s) and 6144 MB RAM detected
    2013-11-26 19:59:18 - ? [339] Local computer is SERVER running Windows NT 6.1 (7601) Service Pack 1
    2013-11-26 19:59:18 - ? [432] There are 12 subsystems in the subsystems cache
    2013-11-26 19:59:34 - ! [364] The Messenger service has not been started - NetSend notifications will not be sent
    2013-11-26 19:59:34 - ? [129] SQLSERVERAGENT starting under Windows NT service control
    2013-11-26 19:59:34 - + [475] Database Mail is not enabled for agent notifications.
    2013-11-26 19:59:34 - + [396] An idle CPU condition has not been defined - OnIdle job schedules will have no effect
    2013-11-26 20:00:32 - ? [130] SQLSERVERAGENT stopping because of Windows shutdown...
    2013-11-26 20:00:33 - ! [359] The local host server is not running
    2013-11-26 20:00:34 - ! [359] The local host server is not running
    2013-11-26 20:00:34 - ? [098] SQLServerAgent terminated (normally)

    Monday, December 9, 2013 7:00 PM
  • Also seeing this in ERRORLOG.

    2013-11-26 20:30:43.08 Logon       Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database 'model'. [CLIENT: 10.x.x.x]
    2013-11-26 20:30:43.09 Logon       Error: 18456, Severity: 14, State: 38.

    Monday, December 9, 2013 7:05 PM
  • That error indicates SQL Agent cannot connect to the SQL Server database engine msdb database.

    This happens because either the rights to the user running SQL Server Agent have been revoked, or the server instance name has been renamed.

    Check the rights of the agent account. See: http://technet.microsoft.com/en-us/library/ms178142.aspx

    and

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/73327808-c24d-4b01-be70-840c15c9ff3a/sqlserveragent-cannot-start?forum=sqlgetstarted


    Monday, December 9, 2013 7:21 PM
    Moderator
  • Thank you sir! I will check it out and get back with you.
    Monday, December 9, 2013 7:29 PM