Compartilhar via


Managing Services

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.

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.

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

See Also

Concepts

Starting, Stopping, and Pausing SQL Server Agent Service

Help and Information

Getting SQL Server 2005 Assistance