We have over 100 jobs configured and at some point the retenion was set to indefinate. We went back and set the retention to 30 days, but the history does not clear. I have been attempting to clear the history and then set I was going to work with the retention setting to determine what the problem is. We had aprox 6G of log data. I have been able to get it down some.
I found that if I duplicate a job, then go back and delete the orginal job, the history appears to "clean up" after a day or so.
Just today I did that for the jobs with records over 6000.
It would be easier to just delete the history manually with a query. I see from the activity montior that a curser delete is being utilized. But it eventually errors. That is when I started using the duplicate trick.
here is where I am right now. The system has not yet purged the history for all the deleted jobs.
dbase TabName Rows ReservedMB DataMB Index_SizeMB UnusedMB
adtempus_ENGWEB01-F logEvent 129030 903.445 531.344 336.680 35.422
adtempus_ENGWEB01-F executionHistoryStep 350340 714.375 584.570 128.477 1.328
adtempus_ENGWEB01-F capturedFile 293414 507.125 378.453 121.664 7.008
adtempus_ENGWEB01-F executionHistoryItem 43774 278.508 157.227 67.711 53.570
If I had a query that would delete all records and not leave any broken relationships, that would enable me to manually delete the history. I have not been able to determine the relationship between the various tables.
If such a query exists, it would be appreciated. Hopefully, the copy trick will get me to a working point.
attached is a summary of the history retention for all the jobs. The NULL names are jobs I have copied and deleted and am hoping will be cleaned up
select count(*) as i, joboid ,( select name from job where job.oid=joboid)as name from logevent group by joboid order by i desc