Multi-instance job log cleanup

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Multi-instance job log cleanup

Post by dls »

I am creating multi-instance jobs that are intended to run only once. The same instance of the job will never be run again unless there is a failure and need to rerun.

My understanding is that auto-purge criteria is only considered the next time the instance runs.

I'm looking for a technique that will allow me to purge to multi-instance job log after it successfully completes. Otherwise, my Director log fills with instances that I no longer need or want.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Multi-instance job log cleanup

Post by chulett »

dls wrote:My understanding is that auto-purge criteria is only considered the next time the instance runs.
No, it happens each time the job runs, regardless of instance.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

Thanks, Craig. I'm setting auto-purge action to 'older than 2 days'.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Just to be pedantic, log purge is initiated only if the job completes with no errors. That is, if the job aborts or is stopped, no automatic purge of log events occurs. That means that you can compare the current run's log with the previous.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

I've reopened this topic.

Even though the logs are being purged as directed, the multi-instance job details are still appearing in my Director client view.

Is there an automated technique to remove the job details from the Director view when all logs for that (multi-instance) job have been purged?
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

It has also been my observation that multi instance job logs only purge upon the next execution of that job+invocation id. The purge logic happens at the start of that cycle.

Notice I said observation. I am perfectly willing to be wrong on this one.

Our site also suffers from that type of log buildup as someone coded a date-stamp in the invocation ID of some jobs.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From what I recall, if you recompile the base job all of those invocations in the Director will go away.
-craig

"You can never have too many knives" -- Logan Nine Fingers
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

...There is a bug in IIS8.7 that prevent the multi instances status records from being purged or cleared. The actual DS logs will be cleared as per the setting in the auto purged but not the name of the instances in the DS director view and will become slower and slower to refresh the logs due to the increasing number of empty records...

Fortunately there is patch for this bug patch_JR46141 ..just request the patch for your specific environment
Last edited by JRodriguez on Tue Jan 17, 2017 5:38 pm, edited 1 time in total.
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

Thanks, I have submitted a PMR. Hopefully the patch can be applied to v8.5
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

FYI:

I'm in 11.3 FP2 and I do not see that my logs going away...

*shrug*
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

Just in case this could help...
The purge rules apply only for new jobs. If you set the purge rules after deploying your DataStage jobs then logs won't be purge for those old jobs..you would need to redeploy them
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can delete all the records for the invocation from RT_STATUSnnn table for job number nnn.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

JRodriguez wrote:The purge rules apply only for new jobs.
Isn't that only true for older versions? Could swear it was something they changed / fixed in "more recent" releases. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think JRodriguez has in mind newly-created jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Just wanted to add a comment to the post by PaulVL...

My current project is on 11.3 FP2 as well. Auto-purge of multi-instance jobs always clears our job log entries as expected. In the vast majority of cases, it also removes the instance so that it no longer appears in the Director client. The strange thing is that there are a small percentage of jobs where the instance does not get removed from Director. It has not been enough of an annoyance at this point for me to try and track down what is different about those jobs.

Mike
Post Reply