The SQL Server Agent service and the SQL Server service monitor each other. After both services have started, if one service fails, the other service restarts the failed service.
Auto-restart should not be enabled for the SQL Server service or the SQL Server Agent service on failover cluster instances.
Restarting the SQL Server Agent Service
When SQL Server Agent starts, it runs an extended stored procedure in SQL Server. This extended stored procedure monitors the SQL Server Agent service, and restarts it if the service exits unexpectedly.
SQL Server Agent jobs that are running at the time of a failover event on a SQL Server failover cluster instance do not resume after failover to another failover cluster node. SQL Server Agent jobs that are running at the time a Hyper-V node is paused do not resume if the pause causes a failover to another node. Jobs that begin but fail to complete because of a failover event are logged as started, but do not show additional log entries for completion or failure. SQL Server Agent jobs in these scenarios appear to have never ended.
Restarting the SQL Server Service
SQL Server Agent can restart the local instance of SQL Server if SQL Server has terminated for reasons other than a typical shutdown. Automatic restart is enabled by default. Because SQL Server Agent restarts the local instance of SQL Server when SQL Server Agent detects an abnormal shutdown, an alert can be set on this event.
SQL Server Agent Service Default Behavior
By default, the SQL Server Agent service logs in to SQL Server every 20 seconds to fetch performance counters. This login creates an entry in the Microsoft Windows event log. To change this behavior, stop the SQL Server Agent service, or change the server login auditing configuration to write only failed logins to the event log.
To modify the login auditing configuration
To set job execution shutdown
To automatically start SQL Server Agent
To send SQL Server Agent error messages
To view the SQL Server Agent error log
To rename the SQL Server Agent error log
To list information about the run-time state of SQL Server Agent jobs