Page 1 of 1

Job is locked

Posted: Tue May 26, 2009 5:08 am
by seshikumar
i have complex job using more than 20 stages, when i ran the job and it is locked .after that i have try to kill the job but still its showing job is accessed by another user my i know root cause of this broblem.plz help

Posted: Tue May 26, 2009 5:38 am
by arvind_ds
Use Clean Up Resources feature present in datastage director.

Posted: Tue May 26, 2009 5:57 am
by ArndW
Did you try to kill the job from the DataStage front end or via the command line?

In this case I also recommend to activate the deadlock daemon and let the system take care of the problem for you.

Edit your $DSHOME/dsdlockd.config file and set "start=1". After that, you can start the deadlock daemon with the command

Code: Select all

nohup bin/dsdlockd >> dsdlockd.log 2>&1 & 

Re: Job is locked

Posted: Wed May 27, 2009 3:59 am
by BenoitCayla
seshikumar wrote:i have complex job using more than 20 stages, when i ran the job and it is locked .after that i have try to kill the job but still its showing job is accessed by another user my i know root cause of this broblem.plz help
To unlock a job (in version 7.x because in the 8.x it's different) you must interract with UniVserse directly in the command line (Administrator)
--> In Administrator / Command Type :
1) CHDIR /.../DSEngine [enter]
2) UNLOCK ALL [enter]

Posted: Wed May 27, 2009 4:36 am
by ArndW
Never EVER do an UNLOCK ALL in UniVerse unless you know exactly what you are doing. This removes all levels of locks from the whole system and can mess up many things, particularly with many running jobs or when many developers are working concurrently.

Posted: Wed May 27, 2009 4:53 am
by BenoitCayla
ArndW wrote:Never EVER do an UNLOCK ALL in UniVerse unless you know exactly what you are doing. This removes all levels of locks from the whole system and can mess up many things, particularl ...
Right it can be dangerous ... but ... do we have a better solution ?
If i remember the command unlock accept the execution lock number as argument instead ... but how can we get that number ? do you have an idea ?

Posted: Wed May 27, 2009 5:11 am
by ArndW
You can get the appropriate PID by using either the graphical Director list or by executing "PORT.STATUS" from the command line. But I still go back to my original statement of activating the deadlock daemon - that will take care of finding the correct process(es) to get rid of and all the user needs to do is wait at most 15 minutes (the default setting).

Posted: Wed May 27, 2009 6:41 am
by chulett
I've found the Cleanup Resources option to be the simplest solution 99% of the time. Yes, sometimes you need to dig a little deeper and know the job number you are looking for, but very rarely do I find a need to go under the covers for a solution.

And, of course, the deadlock daemon. :wink:

Posted: Thu May 28, 2009 7:22 am
by Dave Malia
chulett wrote:I've found the Cleanup Resources option to be the simplest solution 99% of the time. Yes, sometimes you need to dig a little deeper and know the job number you are looking for, but very ...
Use these methods to unlock:

1. use DS.TOOLS to manage processes and locks
2. if using UNLOCK - use LIST.READU to find the user id for the job i/process in question - the use the command UNLOCK USER {user id} ALL

or use the DS Director clean resources as descripbed above. I use DS.TOOLS as you can unlock and clear down the process amongst other rather nice tools.

Posted: Thu May 28, 2009 7:33 am
by chulett
The people I show how to use 'Cleanup Resources' are not the same group of peoples I would want under the covers in the DS.TOOLS menu. Typically. :wink: