Command Line Job Unlock Option
Command Line Job Unlock Option
One of the most wanted option is to provide "dsjob -unlock jobname" kind of option. ofcourse with some restriction that only owner or dsadm or root can unlock the job.
thanks
SAM
thanks
SAM
This is probably doable. I have VB program which I can run any TCL command with. It is part of DwNav. It runs standalone though. I post with my version of DataStageBackup.bat. It does a UNLOCK READULOCK in the UV account before it exports all the projects. This is a dangerous command if you do not understand the issues. Ask Ray. I could post the VB code maybe or someone could write a BASIC program to figure out how to unlock one job.
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Nothing to stop you modifying, or creating your own, dsjob command. The API is documented (Server Job Developer's Guide and Parallel Job Developer's Guide).
I think it would need a whole lot more checking to be safe than just who is executing it. Maybe only allow locks held by defunct processes to be released without query. After all, these locks exist for a reason!
The deadlock daemon can be used to release locks held by defunct processes. If you're the administrator, you can start it in manual mode.
I think it would need a whole lot more checking to be safe than just who is executing it. Maybe only allow locks held by defunct processes to be released without query. After all, these locks exist for a reason!
The deadlock daemon can be used to release locks held by defunct processes. If you're the administrator, you can start it in manual mode.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Actually, in my experience with Tru64 and AIX (unsure about other OSes), kill -14 have been very successful in telling DataStage, "Hey, clean up your stuff then close down." Just killing the "dscs" process (the parent process for DataStage client session) will unlock the jobs for me.
In the rare case it fails (usually when someone does a kill -9 and not admit to it), using the UNLOCK script will work well to clean everything up.
I know how dangerous kill can be (especially kill -9), but I have found DataStage to be robust enough to handle this behavior these days for the two OS I am using. It also comes in handy when you are without dsadm access needed, and do not want to bother your administrator.
In the rare case it fails (usually when someone does a kill -9 and not admit to it), using the UNLOCK script will work well to clean everything up.
I know how dangerous kill can be (especially kill -9), but I have found DataStage to be robust enough to handle this behavior these days for the two OS I am using. It also comes in handy when you are without dsadm access needed, and do not want to bother your administrator.
Hi,
doesn't anybody use the cleaup resources via director and DS.TOOLS anymore?
doesn't anybody use the cleaup resources via director and DS.TOOLS anymore?
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Chances are that you haven't chosen the correct process initially. See my earlier post about child and parent processes. It's not as easy as using WMDs. You have to be very selective.
Last edited by ray.wurlod on Thu Mar 31, 2005 1:49 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
There's your problem RIGHT THERE!sudhirmah wrote:kill -9 <pid>
Read my instructions very carefully.
DO NOT USE -9. DO NOT USE -9.
USE -14!
You killed DataStage using a very hard-core Operating System kill -- where everything's destroyed without mercy. This is a last resort action.
Kill -14 will tell DataStage, "Hey, please quit." DataStage have a specific internal routine that would listen to that kill request. Once it receive that kill request, it would go, "Okay, let me unlock the jobs that are locked, clean up the project VOC stuff, and a few other minor stuff, then I'll leave."
Within a few seconds, that should happens, and your locked jobs will be unlocked by magic.