I'm trying to set SQL Agent History to keep 1 week of logs.
So here's what I do:
After I connect, I right click SQL Server Agent and select Properties.
After that I select History.
Then I observe that no checkboxes are selected.
I Then select the second checkbox (Remove Agent history:).
And change the value of weeks to 1.
And click OK.

After that I reopen to see that nothing was altered.

If that's not enough sometimes when I try to see the history of some particular jobs it timeouts.

1 Answer
1

This is a BUG as per this on MS Connect. Even I can reproduce this. When the check box is selected it purges the data for the date speicified but that option does not remain selected. So it purges the data only once when you select it and click on Ok. You can schedule a job which will execute sp_delete_backuphistory and sp_purge_jobhistory as a workaround.