Monitoring the Environment

SQL Server Agent monitors itself and the Microsoft® SQL Server™ service.

Self-Monitoring

SQL Server Agent starts the xp_sqlagent_monitor extended stored procedure (SQL Server Agent Monitor) to monitor the SQLServerAgent service to ensure that it is available to execute scheduled jobs, raise alerts, and notify operators. If the SQLServerAgent service terminates unexpectedly, the SQL Server Agent Monitor restarts the service.

Restarting the SQL Server Service

SQL Server Agent can restart the local server running SQL Server if it has terminated for reasons other than a normal shutdown. Automatic restart is enabled by default. SQL Server Agent writes error 14265 of severity 140 to the application log and restarts SQL Server when it detects abnormal termination. This allows an alert to be set on this event.


Note If you are using SQL Server clustering, you must disable auto-restart in order for failover to work.


To set job execution shutdown

To autostart SQL Server Agent Monitor

    

To send SQL Server Agent error messages

To view SQL Server Agent error log

To rename a SQL Server Agent error log

To view a master SQL Server Agent error log

See Also

StopMonitor Method


(c) 1988-98 Microsoft Corporation. All Rights Reserved.