Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 or SQL Agent job limitations in SQL Managed Instance 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.
For detailed information, see Implement SQL Server Agent Security.
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.
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.