Best practices for SQL Server Agent job history retention

Category: Reliability

Item: SQL Agent Jobs history settings

What is the SQL Server Agent Job History Retention?

It will determine the amount of Job History records that SQL Server before delete.

Agent job history set up to purge all history records once the history log reaches a certain number of rows by default.

Logs are helpful for troubleshooting; having insufficient records makes it more difficult to identify problems.

How to identify the issue and how to fix it?

  1. Connect to the SQL instance using SSMS (SQL Server Management Studio);
  2. Right-click on the SQL Server Agent and open the properties;
Figure 1- SQL Server Agent properties.
Figure 2- SQL Server Agent history size.

We recommend changing the Maximum job history log size (in rows) to 50,000 and Maximum job history rows per job to 1,000.

Note: These numbers can vary according to you with your business needs.

More information

Microsoft – Set Up the Job History Log



I am an Enterprise SQL Server Database Administrator with 10+ years of experience working with complex transactional environments.

Leave a Reply

Your email address will not be published.

Contact Us