Page 1 of 1

Routine gets locked

Posted: Wed Dec 01, 2004 12:09 am
by nkln@you
I executed a job and the job got stuck while executing a routine. When i tried to stop the xecution of the job, it did'nt happen. So, i used "clean up resources" option and released all processes for that job. Now, i can compile the job again. But , when i tried to open the routine , it says it is locked. How to release the lock for a routine. In director , we can only unlock jobs.But what about routine? How can we unlock a routine.


The next day when i came , i observed the lock on routine is released. I don't know how it happened.

Posted: Wed Dec 01, 2004 12:13 am
by ray.wurlod
If DataStage had been restarted, all locks are released.

If your server has the DataStage deadlock daemon (dsdlockd) running, it will clean up locks held by defunct processes.

An Administrator might also have released the lock that was held on the routine in order to perform an export of the project.

Posted: Wed Dec 01, 2004 3:29 am
by lynnliu
Try show all locks and get the pid# of your routine in job resources window, and then show all processes , find your pid#, log out it.

Posted: Wed Dec 01, 2004 4:15 am
by nkln@you
Hai ray.wurlod , thanks for your reply , how can we know deadlock deamon is running on server, how can an administrator release the lock for a routine.Can u explain this pls



Hai lynnliu thanks for your reply,

Only for jobs, we can get process id in Director . But can we get process id for routines in Director using clean up resources option,

Posted: Wed Dec 01, 2004 7:30 am
by kcbland
Search this forum for unlocking jobs. Also look for "DS.TOOLS". Your function is just an object in the lock table, it will show up on the lock listing and you can release it.

Posted: Wed Dec 01, 2004 2:27 pm
by ray.wurlod
To determine whether the DataStage deadlock daemon is running on a UNIX machine execute the UNIX command

Code: Select all

ps -ef | grep dsdlockd | grep -v grep
If it's running you'll learn its process ID; if it's not running the report will be empty.

Edit the $DSHOME/dsdlockd.config file to enable auto-start of the deadlock daemon when DataStage starts.

(On Windows servers look for dsdlockd among the processes in Task Manager.)

Posted: Wed Dec 01, 2004 8:36 pm
by lynnliu
We can get process id for routines in Director using clean up resources option. i have done that many times.

There are two kind of list form in Jobs Resources window-----"processes" and "locks". click "show all" in locks, you can find all the locked routines and jobs name list with pid#, and then "show all" in processes,find the that pid#, log out it

Thanks

Posted: Fri Jan 07, 2005 10:12 am
by Athorne
Our Deadlock Daemon takes up an abnormally large amount of CPU while jobs are running. Is this normal? Does that indicate some type of configuration issue or possibly a tuning need? Any information would be greatly appreciated.

Posted: Fri Jan 07, 2005 10:33 am
by kcbland
The deadlock daemon is not needed. Back in the day tech support used to tell customers take it out of the services startup script because it would go bonkers and chew up a cpu. You can kill it the process, and remove it from the startup script.

Posted: Fri Jan 07, 2005 10:41 am
by chulett
Um... it's not needed? Am I not gaining anything by running it nowadays on a 7.x server? :?

Posted: Fri Jan 07, 2005 11:37 am
by kcbland
Its main purpose is to clear out locks where the underlying process has died. Given the volume of posters looking for ways to release locks indicates the daemon is not too quick on the draw for finding these ophaned locks and releasing them. Since you can do it yourself much faster, why wait or use the daemon? It doesn't run your jobs, it doesn't work with the GUI clients, so what is it really doing for you? Wasting a cpu is about it.

Posted: Fri Jan 07, 2005 11:55 am
by Athorne
Thanks a mill Ken, I appreciate the response. I'll go ahead and turn it off. It's not like I can't access the deadlock menu and clear them out manually as you said.

Posted: Fri Jan 07, 2005 2:08 pm
by chulett
kcbland wrote:Given the volume of posters looking for ways to release locks indicates the daemon is not too quick on the draw for finding these ophaned locks and releasing them.
I think that may be due more to the fact that it defaults to being off nowadays and most (new) people don't seem to know about it.

That being said, if it's not really doing all that much, I won't feel all that bad about shutting it down the next time it gets out of hand. :wink: