Job is locked

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

Post Reply
seshikumar
Participant
Posts: 44
Joined: Fri Mar 16, 2007 5:51 am

Job is locked

Post 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
seshu
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

Use Clean Up Resources feature present in datastage director.
Arvind
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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 & 
BenoitCayla
Participant
Posts: 15
Joined: Wed May 27, 2009 2:42 am
Location: PARIS

Re: Job is locked

Post 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]
___________________
Benoît CAYLA
benoit.cayla@exl-group.com
my blog (in French) http://www.exl-infosfr.com/
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
BenoitCayla
Participant
Posts: 15
Joined: Wed May 27, 2009 2:42 am
Location: PARIS

Post 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 ?
___________________
Benoît CAYLA
benoit.cayla@exl-group.com
my blog (in French) http://www.exl-infosfr.com/
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Dave Malia
Participant
Posts: 7
Joined: Thu May 28, 2009 5:10 am
Location: Plymouth
Contact:

Post 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.
I'm lovin it!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply