deadlock detected while waiting for resource

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
talsimad
Participant
Posts: 8
Joined: Mon Nov 28, 2005 4:56 pm

deadlock detected while waiting for resource

Post by talsimad »

I'm trying to update an Oracle table with few key columns and sometimes the job abort with the fatal error: "deadlock detected while waiting for resource".
did someone know how to avoid this error.
i'm working on datastage px 7.01 on unix aix server.

best regards
talsimad
Participant
Posts: 8
Joined: Mon Nov 28, 2005 4:56 pm

deadlock detected while waiting for resource

Post by talsimad »

the stage oracle is in parallel mode i khow that if i force the stage to be in sequential mode the problem will be resolved but the it will be executed slowly.
i'm trying to add specific options to avoid the problem....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Partition your data properly to ensure your parallel streams aren't trying to update the same data.
-craig

"You can never have too many knives" -- Logan Nine Fingers
talsimad
Participant
Posts: 8
Joined: Mon Nov 28, 2005 4:56 pm

deadlock detected while waiting for resource

Post by talsimad »

thanx
i already do it, i have partionned with the round robin method but it seem that the problem presist
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you attempting to write to the table while still selecting from the same table? This can lead to a self-deadlatch situation.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

Try a hash partition... we had this problem when he had duplicate records in the data. A hash partition solved the problem for me.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: deadlock detected while waiting for resource

Post by chulett »

talsimad wrote:i already do it, i have partionned with the round robin method but it seem that the problem presist
Then, perhaps, you don't already do it. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you updating the same table from which you are selecting?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Post by csrazdan »

You can get "deadlock detected while waiting for resource" error if you have multiple DML statements based on the same key in one transaction. You can avoid this error if you set Oracle commit level to 1. This will solve your problem but it will add an overhead of each record commit.

Alternatively, you can add a remove duplicate stage in the job stream and select the last record for updation.

Hope it helps........
Assume everything I say or do is positive
Post Reply