Using the SQL Server Agent Error Log

Administering SQL Server

Administering SQL Server

Using the SQL Server Agent Error Log

SQL Server Agent creates an error log that, by default, records warnings and errors. The following types of messages are displayed in the SQL Server Agent error log:

  • Warning messages that provide information about potential problems, such as, "Job test was deleted while it was executing."

  • Error messages that usually require intervention by a system administrator to resolve, such as, "Unable to start mail session." Error messages can be sent to a specific user or computer by network popup.

SQL Server maintains up to nine SQL Server Agent error logs. Each archived error log has an extension indicating the relative age of the error log. For example, an extension of .1 indicates the newest archived error log and an extension of .9 indicates the oldest archived error log.

By default, execution trace messages are not written to the SQL Server Agent error log, because they can fill it, thereby reducing your ability to select and analyze more difficult errors. As the SQL Server Agent error log adds an additional processing load to the server, consider what value you attain by capturing execution trace messages to this error log. Generally, it is best to capture all messages only when you are debugging a specific problem.

When SQL Server Agent is stopped, you can modify the location of the error log. When the Microsoft® SQL Server™ error log is empty, it cannot be viewed.

To view the SQL Server Agent error log