SQL Server 2008 Agent History retention does not “stick”

Have you ever observed this behavior

Under SSMS > right-click SQL Server Agent > Properties>  History. Enable checkbox “Remove agent History Older than 4 weeks.”. Press OK. Everything is fine (no error message or warning.)

Go back to SSMS, hit Refresh and check out History again. The “Remove agent history” checkbox (That we had selected) is now deselected. Try changing the retention period to different values, hit OK,  but setting are not present when we return to the History dialog.

This issue is as a result of a glitch in SSMS,and is already reported as a BUG.


As always there is a workaround for this issue –

You can use sp_purge_jobhistory command to accomplish what you need.

Example – EXEC msdb.dbo.sp_purge_jobhistory @oldest_date= @adjusteddate”


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s