Resize the job history log
Applies to: SQL Server
Important
On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.
This article describes how to set size limits for Microsoft SQL Server Agent job history logs by using SQL Server Management Studio.
This feature doesn't work for SQL Server on Linux.
Security
For detailed information, see Implement SQL Server Agent Security.
Use SQL Server Management Studio
Resize the job history log based on raw size
In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
Right-click SQL Server Agent, and then select Properties.
Select the History page, and then confirm that Limit size of job history log is checked.
In the Maximum job history log size box, enter the maximum number of rows the job history log should allow.
In the Maximum job history rows per job box, enter the maximum number of job history rows to allow for a job.
Resize the job history log based on time
In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
Right-click SQL Server Agent, and then select Properties.
Select the History page, and then select Remove agent history.
Select the appropriate number of Days, Weeks, or Months.