increase the retention for SQLAgent

increase the retention for SQLAgent

by default it clears history after 100 lines or something dumb

 

USE [msdb]

GO

EXEC [dbo].[sp_set_sqlagent_properties]

@jobhistory_max_rows=10000,

@jobhistory_max_rows_per_job=1000

GO