Page 1 of 1

how to unlock a ds job using unix commands

Posted: Thu Jan 27, 2005 7:05 am
by santoshkumar
hi there,

can anyone tell me the steps involved in unlocking a locked server job in unix.

thanks in advance.



santosh

Posted: Thu Jan 27, 2005 7:33 am
by ArndW
Santosh,

there are a number of ways of looking at the DataStage locks and also of removing them. Unfortunately using them without understanding the causes of the "hung" locks can and WILL cause the system to become unstable. The DataStage Director (when enabled) and the Administrator let a person list and remove locks in a much more controlled and accepted way than doing it directly from UNIX.

The product has become so much more stable at Version 7.x so that I have only once removed locks manually (I switched off the PC while editing a job and didn't want to wait for the automated cleanup).

What is causing your locks to be so persistent that you want to manually modify them?

Thanks, but how to do in unix

Posted: Thu Jan 27, 2005 7:50 am
by santoshkumar
hi ArndW,

Thanks for your reply.I have faced some situation where in a server job left open in an ideal state eg. say whole night. It gets locked sometime[There might be other scenario's as well]. There is way to unlock it in DataStage Director --->Clean up resources.

I want to do the same using unix commands like finding the processes and killing the process related my job.


ArndW wrote:Santosh,

there are a number of ways of looking at the DataStage locks and also of removing them. Unfortunately using them without understanding the causes of the "hung" locks can and WILL cause the system to become unstable. The DataStage Director (when enabled) and the Administrator let a person list and remove locks in a much more controlled and accepted way than doing it directly from UNIX.

The product has become so much more stable at Version 7.x so that I have only once removed locks manually (I switched off the PC while editing a job and didn't want to wait for the automated cleanup).

What is causing your locks to be so persistent that you want to manually modify them?

Posted: Thu Jan 27, 2005 7:58 am
by Sainath.Srinivasan
In cases like this where peopleleave things open, you can use the 'Do not timeout' facility from DataStage Administrator.

Also do ensure that people do log out when they leave.

Additionally you can bounce datastage and the Unix servers for maintenance and backups on periodic basis.

Thanks

Posted: Thu Jan 27, 2005 8:27 am
by santoshkumar
Thanks ,

I will try the time out facility


regards
santosh

Sainath.Srinivasan wrote:In cases like this where peopleleave things open, you can use the 'Do not timeout' facility from DataStage Administrator.

Also do ensure that people do log out when they leave.

Additionally you can bounce datastage and the Unix servers for maintenance and backups on periodic basis.

Unlocking Jobs

Posted: Thu Jan 27, 2005 6:29 pm
by trokosz
I agree with others that unlocking Jobs and killing processes can cause issues so be aware and careful. In all cases make sure the impacted User gets out all together and unlock by UserID.

But to unlock Jobs you can:

1. In DataStage Administrator there is a process thats defined in DSXChange already at the command level and you can also call DS.TOOLS from command.

2. In Unix you can go to DataStage Engine, . ./dsenv, bin/dssh, and run DS.TOOLS or execute the same commands you did in Administrator.

3. If you shutdown DataStage then there is a script called ds.rc in the $DSHOME/Sample location that checks for outstanding processes and kills with grace. If you want to go this far.

Re: how to unlock a ds job using unix commands

Posted: Wed Feb 02, 2005 5:39 pm
by s1kaasam
Hi Santosh
It is very easy to unlock the locks.But before you unlock make sure you have killed all the processes running.To do that

Log onto the server as the developer username and first list all the processes runnig.To do that go to DSEngine directory prompt and initialise dsenv (. ./dsenv). After that type in bin/uv at the prompt.Then you get a single prompt where u type list.readu(automatically converts to uppercase).You would list all the processes running or having active locks.Identify the PID's for the processes then quit from the prompt come back to DSEngine prompt and do a kill -9 on those PID's.After you have killed those pids in another telnet session log on as dsadm user to unlock.

Go back to the DSEngine and type bin/uv to take you to the same single prompt list those processes again as you did above and this time get the user no. for those processes.Then at the same single prompt enter the following
unlock user <user no> all
do it for all the locked processes this way you would cleanup all the hanging processes.Then quit.

Any questions please let me know.

Posted: Wed Feb 02, 2005 7:47 pm
by kcbland
Take a look here, even though it's Windoze it is still the same information.

viewtopic.php?t=85570