How to Recycle SQL Agent Error log
Command: sp_cycle_agent_errorlog
• SQL Server Agent can maintain up to nine SQL Server Agent Error Logs. The currently used SQL Server Agent Error Log will be named SQLAGENT.OUT
• There is no way you can increase this number
• By default, the SQL Server Agent Error log is located in "Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\SQLAGENT.OUT".
Syntax:
EXEC msdb.dbo.sp_cycle_agent_errorlog;
Go
This is only required when you have frequent job failures or job warnings. Ideally one should have job to recycle error logs
Blog is own by algaeservices.co.in
Leave a Comment