how to unlock a ds job using unix commands

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
santoshkumar
Charter Member
Charter Member
Posts: 35
Joined: Sun Jan 16, 2005 8:39 am
Location: US

how to unlock a ds job using unix commands

Post by santoshkumar »

hi there,

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

thanks in advance.



santosh
Santosh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
santoshkumar
Charter Member
Charter Member
Posts: 35
Joined: Sun Jan 16, 2005 8:39 am
Location: US

Thanks, but how to do in unix

Post 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?
Santosh
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
santoshkumar
Charter Member
Charter Member
Posts: 35
Joined: Sun Jan 16, 2005 8:39 am
Location: US

Thanks

Post 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.
Santosh
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

Unlocking Jobs

Post 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.
s1kaasam
Participant
Posts: 17
Joined: Wed Feb 02, 2005 5:11 pm
Location: virginia

Re: how to unlock a ds job using unix commands

Post 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.
shravan
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Take a look here, even though it's Windoze it is still the same information.

viewtopic.php?t=85570
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply