Szerkesztés

Megosztás a következőn keresztül:


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

  1. In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.

  2. Right-click SQL Server Agent, and then select Properties.

  3. Select the History page, and then confirm that Limit size of job history log is checked.

  4. In the Maximum job history log size box, enter the maximum number of rows the job history log should allow.

  5. 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

  1. In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.

  2. Right-click SQL Server Agent, and then select Properties.

  3. Select the History page, and then select Remove agent history.

  4. Select the appropriate number of Days, Weeks, or Months.