Page 1 of 1

Can I find logs cleared by user from director? if yes how?

Posted: Fri Jan 25, 2008 7:57 am
by priyadarshikunal
Hi,

Can I find logs cleared by another user from director?

if yes how can i get that?


Regards,

Posted: Fri Jan 25, 2008 8:07 am
by AmeyJoshi14
I am not sure, that whether you can find the logs in Datastage Director.. :oops:
:!: But you can see the logs in unix.
Use following commands..
. $DSHOME/dsenv
dsjob -logsum -type INFO -max (number of logs you want to see) PROJECT_NAME JOB_NAME

Now inorder to get last 3 runs use this command
dsjob -logsum -type STARTED -max 6 PROJECT_NAME JOB_NAME
from that take the difference(from the first column) and use that number in above command. :wink:

Posted: Fri Jan 25, 2008 8:08 am
by chulett
I suppose you could find that, yes, but not who cleared it. Use the standard 'DSGet' functions for the logs and search for 'Log cleared by user' as one of the events.

Posted: Fri Jan 25, 2008 9:48 am
by priyadarshikunal
chulett wrote:I suppose you could find that, yes, but not who cleared it. Use the standard 'DSGet' functions for the logs and search for 'Log cleared by user' as one of the events. ...
I tried using DSGetLogEntry(JobHandle, DSJ.LOGANY)

but I am getting a warning message

Cannot get log event with id '99'

and retrurn code is (-4)

I am unable to find why?

Posted: Fri Jan 25, 2008 9:49 am
by priyadarshikunal
chulett wrote:I suppose you could find that, yes, but not who cleared it. Use the standard 'DSGet' functions for the logs and search for 'Log cleared by user' as one of the events. ...
I tried using DSGetLogEntry(JobHandle, DSJ.LOGANY)

but I am getting a warning message

Cannot get log event with id '99'

and retrurn code is (-4)

I am unable to find why?

Posted: Fri Jan 25, 2008 9:56 am
by chulett
-4 is BADVALUE, your syntax is wrong. DSJ.LOGANY is valid for DSGetNewestLogId, your function requires a specific EventId and pulls a single entry from the log.

Posted: Sat Jan 26, 2008 1:02 am
by ray.wurlod
I read the question differently. I understand that the question is whether it's possible to recover log events that have been cleared.

The answer to that question is NO.

Posted: Sat Jan 26, 2008 7:46 am
by chulett
Ok... if the question is 'can I recover cleared log messages?' then as Ray notes, the answer is no. I read it as the OP wanted to identify which logs had been cleared, which is what I attempted to answer.

Posted: Sat Jan 26, 2008 4:28 pm
by ray.wurlod
We await clarification from priyadarshikunal.