Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 stackoverflow.com Aug 14 '12 at 18:21

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

1 Answer 1

up vote 7 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
1  
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
3  
Whoa, easy now... –  Aaron Bertrand Aug 13 '12 at 17:50

Your Answer

 
discard

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.