sys.sp_cycle_agent_errorlog
general #stored-procedure
Description
Closes the current SQL Server Agent error log file and cycles the SQL Server Agent error log extension numbers just like a server restart. The new SQL Server Agent error log contains a line indicating that the new log was created.
Syntax
sp_cycle_agent_errorlog
Remarks
Closes the current SQL Server Agent error log file and cycles the SQL Server Agent error log
extension numbers just like a server restart. The new SQL Server Agent error log contains a line
indicating that the new log was created.
(success) or
Every time SQL Server Agent is started, the current SQL Server Agent error log is renamed to
, and so on.
enables you to cycle the error log files without stopping and starting
the server.
This stored procedure must be run from the
Examples
Example 1
sp_cycle_agent_errorlog
Example 2
USE msdb;
GO
EXECUTE dbo.sp_cycle_agent_errorlog;
GO