Page 1 of 1

Director Logging

Posted: Sun Nov 16, 2008 11:53 pm
by Novak
Hi,

I was hoping somebody could advise with what would be the best solution for the following situation.

In my project there are many mulitple-instance jobs used. For the reasons unknown to me this job has been used so that every time ExecJob routine runs this instance, the FileDateTime combination is attached to it.
Now, as you can imagine, over a period of time the Director will be overwhelmed with the entries of these runs. And only the 5 runs at worst are to be kept. Bare in mind, I am not talking about the logging of the individual jobs.

My current approach is to recompile the main job in order to help the Director. Is there any other, simpler way to do this.
And, if not, how best I could automate this step but so that the compilation only takes place after all the files have been succesfully processed.

Regards,

Novak

Posted: Mon Nov 17, 2008 1:26 am
by chulett
AFAIK, that compile that you are doing is how one must remove instances from the Director. As for the timing, depends on your job design... perhaps a Sequence job would help? :?

Posted: Mon Nov 17, 2008 2:11 am
by ray.wurlod
You can automate the process by deleting those entries from the job's status table that pertain to the particular invocation ID. That would require, of course, a routine that determines the job's job number (to establish the name of the status table), and the invocation ID in question.

Learn about the structure of status table keys by executing the following query for a job that has been invoked with multiple invocation IDs.

Code: Select all

SELECT @ID FMT '40L' FROM RT_STATUSnnn ORDER BY 1;
where nnn is the job number.

Posted: Mon Nov 17, 2008 11:53 pm
by Novak
Thanks guys,

After determing the job's job number though, would it just be safe to delete everything from a status table '..where number = nnnn'? Just to depict how crazy it can get, to open up a job category in Director it takes over 10 minutes at times. For a specific one, there was over 3,500 entries.

Also, would you be able to tell me what is the exact command deleting these entries based on a job number?
And, how do I obtain the list of all the commands run from the Administrator? :roll:

Regards,

Novak

Posted: Mon Nov 17, 2008 11:55 pm
by Novak
Thanks guys,

After determing the job's job number though, would it just be safe to delete everything from a status table '..where number = nnnn'? Just to depict how crazy it can get, to open up a job category in Director it takes over 10 minutes at times. For a specific one, there was over 3,500 entries.

Also, would you be able to tell me what is the exact command deleting these entries based on a job number?
And, how do I obtain the list of all the commands run from the Administrator? :roll:

Regards,

Novak

Posted: Tue Nov 18, 2008 12:59 am
by ray.wurlod
There will typically only be three entries per invocation ID in the status table. I don't have access to DataStage at the moment, but executing the query I gave earlier will show you the structure of the keys.

If you post the result of that query here, and tell us one of the invocation IDs, then it will be possible for me to show you the DELETE statement that is required.

But you do need to be careful, particularly of any "delete everything" approach. In particular you must not delete the base job entries from the status table.

Posted: Tue Nov 18, 2008 6:26 pm
by Novak
Thanks for that.

Well, the screenshot of the partial outcome (there are 994 entries all up) of "SELECT @ID FMT '40L'..." is as:

Image

The invocation ID I am using to get the entries from the STATUS table is 1110.

Regards,

Novak

Posted: Tue Nov 18, 2008 6:27 pm
by Novak
Strange.... how do I post the image in this box?

Regards,

Novak

Posted: Tue Nov 18, 2008 7:24 pm
by chulett
Like that but it looks like you have the "Disable BBCode in this post" enabled. Edit the post, uncheck the option, preview and see if that fixes it.

Posted: Tue Nov 18, 2008 10:43 pm
by Novak
No, thats not the problem. It definitely was not enabled.
I tried reposting as well but it just posts the link.

However, in the meantime I came across the CompileAll routines and thought of playing with that a little.
If I am successfull no DELETE commands in STATUS tables will have to be used, and it will make the client much happier as well.

Thanks & Regards,

Novak

Posted: Wed Nov 19, 2008 8:28 am
by chulett
Ah... it doesn't recognize it as an "image" without a extension of the appropriate type - jpg, bmp, etc. For Picasaweb you'd need to use a URL tag.