Page 1 of 1

How to clear log file

Posted: Wed Jul 21, 2004 4:27 am
by elavenil
Hi,

I have a job, which has more than 100000 log entries and when i clicked on 'View log' from director but it takes time very long to list all entries of the job. So i am thinking of clearing the log from UNIX. I remember there is 'CleanupJob' command to clear the log but i have no idea how to run this command from UNIX.

Can anyone help me to clear a job log from UNIX?

Thanks for your help.

Regards
Saravanan

Posted: Wed Jul 21, 2004 6:22 am
by ray.wurlod
Why are you trying to do it from UNIX? Don't you have access to a DataStage client?

The "approved" method to purge a log is using the Director menu: Job > Clear Log, then choose immediate purge.

There's no UNIX command for doing it properly (that is, preserving the control entries).

You can, from the UNIX prompt, clear all entries including the control (management) entries but, to do so, you need to know the job number so that you can correctly identify the log, which is actually a table in the DataStage Repository database. You need to get into the DataStage Engine environment and execute an appropriate interactive command.

Please use the Director; it's better and safer.

Posted: Wed Jul 21, 2004 6:47 am
by chulett
The 'trick' is to not View the log first, but to clear it from the Status view. It will still take a little time for the dialog to come up, but it is only counting them (looking for the most recent record) rather than trying to suck all of them up to your client.

You are taking advantage of the Auto Purge function available for the logs, right?

Posted: Mon Jul 26, 2004 10:11 pm
by elavenil
Hi,

As Craig mentioned in his email, my concern is the time that it takes to show the pop up window before clearing the log.

As suggested, managed to clear the log using Administrator client.

Thanks for your suggesstions.

Regards
Saravanan

Clearing Datastage Director Log

Posted: Tue Jul 27, 2004 1:11 am
by mandyli
[code]As ray said The "approved" method to purge a log is using the Director menu: Job > Clear Log, then choose immediate purge or you can go to data stage administrator and set the purge log but better use the Director for clearing log..[/code]

Posted: Tue Jul 27, 2004 2:57 am
by mleroux
An auto-purge comes in really handy to prevent such super-long logs. Craig's already mentioned it, but anyway...

In Director's Status View, with the job in question selected:

Job --> Clear Log... --> Auto-purge --> Enabled for this job

Set it up and voila! :D