Cleaning out Director log entries

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

mak
Participant
Posts: 24
Joined: Thu Oct 16, 2003 9:15 pm

Post by mak »

That helps.

Thanks Craig
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are two sets of things you need to remove.

In job logs, field number 7 is used to store the invocation ID. However, field number 7 is not exposed in the file dictionary of RT_LOG, so you need to generate a reference to it on the command line.

Code: Select all

DELETE FROM RT_LOGnnn WHERE EVAL "@RECORD<7>" = 'invocationID' AND TIMESTAMP < (CURRENT_DATE - 5);
You also need to remove the invocation entries from RT_STATUSnnn. Key values in RT_STATUSnnn consist of the job name, a ".", the invocationID or "" then, possibly, another "." and more information. I've found that two DELETE statements are safer.

Code: Select all

DELETE FROM RT_STATUSnnn WHERE @ID LIKE '%.invocationID.%';
DELETE FROM RT_STATUSnnn WHERE @ID LIKE '%.invocationID';
Obviously, substitute your own invocation ID and nnn values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply