Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I feel like this is a silly question but for the life of me, I can't track down what is going on. I have just taken over administration of several servers and on all of them, the job history is being retained for only 5 days. There is a cleanup maintenance plan but it's set for 5 week retention.

EXEC msdb.dbo.sp_syspolicy_purge_history is being run daily however, the History Retention Days is set to 0 so my understanding is that it's not doing anything anyway.

There has to be something really simple I'm missing here. Can anyone point me in the right direction?

share|improve this question

migrated from Aug 14 '12 at 18:21

This question came from our site for professional and enthusiast programmers.

up vote 9 down vote accepted

That job has to do with policy-based management, not SQL Server Agent jobs in general. In Object Explorer right-click SQL Server Agent and select Properties, then move to the History tab. What does it say here:

enter image description here

You can adjust those settings so that it keeps more rows overall, more rows per job, and keeps history longer. I am guessing either you have a lot of jobs on this server or these settings have been changed.

share|improve this answer
I love you Aaron (in a manly kind of way!) You are right...the numbers were set low and we have tons of jobs....problem solved! – Gizmo Aug 13 '12 at 17:49
Whoa, easy now... – Aaron Bertrand Aug 13 '12 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.