4 Replies Latest reply on Nov 11, 2009 6:30 PM by Scott Rabinow

    database cleanup of job_run_event

    Scott Rabinow

      Currently running v7.4.6 appservers and using the builtin retention policy and database cleanup. We are using the default of 90 days for job runs, but the job run details (which I believe are stored in the job_run_event table) are being deleted after only 14 days and we'd like to keep them for a longer period.


      I've hunted around quite a bit and can't seem to find any way to configure the retention policy to keep them for say 30 or 60 days.


      What have I missed?

        • 1. Re: database cleanup of job_run_event
          Bill Robinson

          There's a property value set on all jobs called "RETENTION_POLICY" (something w/ retention in the name). you need to set that on existing jobs and set that as the default in the property dictionary. it's in the property dictionary in the job class.

          • 2. Re: database cleanup of job_run_event
            Scott Rabinow



            Thanks, I've done that already. It's actually called RESULTS_RETENTION_TIME, (the OOB default is 90 days) and that clearly controls which job runs remain in the database. What is happening in our database is that the detailed log messages in each job run are being deleted after 14 days, so we have 76 days of job runs without any detailed log messages. I'd like to keep the detailed messages longer than 14 days. I'm sure I read somewhere that it is possible to configure this time period, but I can't find it now.....

            • 3. Re: database cleanup of job_run_event
              Bill Robinson

              Sorry, I re-read your post, and I understand.. I think this is a defect, there's a hotfix for this (for 7.6 atleast), the ticket is ISS03419767 "Job run events and audit trail log younger than RETENTION_TIME can get purged by database cleanup."


              Open up a support ticket and ask for this fix

              • 4. Re: database cleanup of job_run_event
                Scott Rabinow

                All - this applies to v7.4.6, not sure about other versions...


                Just to circle back for everyone's benefit, it seems the key values I was looking for are actually stored within the database itself, and here is the SQL to set the retention values at 90 days (to match the default RESULTS_RETENTION_TIME job property):





                Also, if you want the job runs themselves actually deleted from the database (not just marked for deletion and removed from the view in the GUI), you need to make a small configuration change via blasadmin, as follows:


                blasadmin set Cleanup DatabaseCleanupFilterEnabled false


                The default value is "true", and we had over 300K job runs in our production database marked for deletion over the last 2 years, but still sitting around in the job_run table...