Home » Server Options » RAC & Failsafe » ora 2049 error distributed_lock_timeout (oel 6)
ora 2049 error distributed_lock_timeout [message #639156] Thu, 02 July 2015 06:44 Go to next message
mvrkr44
Messages: 132
Registered: December 2012
Senior Member
Hi All,

i am getting 0ra 2049 error in the below scenario...

DB:oracle 11g
version:11.2.0.4 RAC 2 node
os:OEL6

from application i am inserting values into primary table & child table at same time...While saving from .Net application i am getting error after some time
ora 2049 distibuted transaction lock...

i tried in all ways..but i didn't succeed.Could you please help me..

i tried to increase the parameter distributed_lock_timeout ,but no use after increasing also.

Regards,
Rajesh
Re: ora 2049 error distributed_lock_timeout [message #639157 is a reply to message #639156] Thu, 02 July 2015 06:48 Go to previous messageGo to next message
mvrkr44
Messages: 132
Registered: December 2012
Senior Member
And one more thing i forgot to mention...Only in RAC environment i am getting this error.
With out RAC ..there is no problem...
Re: ora 2049 error distributed_lock_timeout [message #639159 is a reply to message #639156] Thu, 02 July 2015 07:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

ORA-02049: timeout: distributed transaction waiting for lock
 *Cause: exceeded INIT.ORA distributed_lock_timeout seconds waiting for lock.
 *Action: treat as a deadlock
Re: ora 2049 error distributed_lock_timeout [message #639163 is a reply to message #639159] Thu, 02 July 2015 08:42 Go to previous messageGo to next message
mvrkr44
Messages: 132
Registered: December 2012
Senior Member
Hi Michel,

Thanks for your reply..How can i avoid this error.
In RAC environment only i am getting this error.
With our RAC environment,i am not getting this error.
Re: ora 2049 error distributed_lock_timeout [message #639164 is a reply to message #639163] Thu, 02 July 2015 08:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

It depends on the actual code and how it is executed.
The key point is "treat as a deadlock": you didn't say but I bet you use XA and one part of the transactions is on one node and the other one in other node.
Remove "load balancing" if you cannot analyze and change the code, it is then more likely it will work.

[Updated on: Thu, 02 July 2015 08:52]

Report message to a moderator

Re: ora 2049 error distributed_lock_timeout [message #639165 is a reply to message #639164] Thu, 02 July 2015 08:57 Go to previous messageGo to next message
mvrkr44
Messages: 132
Registered: December 2012
Senior Member
Hi Michel,

thanks for your reply...I wil explain the detail issue..
from .Net application we are inserting data into two tables.Both are dependent each other(PK & FK is there).
While saving it will insert records into both tables.At that time we are getting this error.

I am thinking that in RAC, two dml operations is going in two different nodes? that is the reason this error is occurring.But
from application level they are teating both transactions in single transaction.




Regards,
rajesh
Re: ora 2049 error distributed_lock_timeout [message #639167 is a reply to message #639165] Thu, 02 July 2015 09:19 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
One very basic question - how is the service to which your application is connecting configured? If you are using distributed transactions, you must enable the appropriate attribute or it won't work.
Re: ora 2049 error distributed_lock_timeout [message #639171 is a reply to message #639165] Thu, 02 July 2015 09:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
I am thinking that in RAC, two dml operations is going in two different nodes?


Correct and the error does not happen if you are not using XA or if you have not set distributed transaction between the nodes.
Check V$SERVICES.DTP for your connection service as John suggested.

Re: ora 2049 error distributed_lock_timeout [message #639305 is a reply to message #639171] Mon, 06 July 2015 00:26 Go to previous messageGo to next message
mvrkr44
Messages: 132
Registered: December 2012
Senior Member
i tried in different ways..i found one of the reason is SCAN ....
when i removed scan from TNS entry and copied VIP's (11G R1)..then it is working ...
Re: ora 2049 error distributed_lock_timeout [message #639307 is a reply to message #639305] Mon, 06 July 2015 01:07 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
This "solution" means that you are not using distributed transactions any more. Well, OK. But you also no longer have any of the fault tolerance capabilities for which you bought RAC. Oracle supports distributed transactions (which is an amazing piece of technology) you simply have to enable them.
Re: ora 2049 error distributed_lock_timeout [message #639308 is a reply to message #639307] Mon, 06 July 2015 01:20 Go to previous messageGo to next message
mvrkr44
Messages: 132
Registered: December 2012
Senior Member
for me PK & FK creating problem...it is happening in two sessions through SCAN...so i removed it and added VIP's in my TNS...
is there any way to control both in same session...So i will use SCAN with out any changes in my application

Regards,
Rajesh
Re: ora 2049 error distributed_lock_timeout [message #639309 is a reply to message #639308] Mon, 06 July 2015 01:25 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I (and MC) have already told you: allow the service to which you connect to do distributed transactions. Have you looked up how to create a service yet? With dbms_service, or srvctl?
Re: ora 2049 error distributed_lock_timeout [message #639311 is a reply to message #639308] Mon, 06 July 2015 01:27 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
And, by the way, there is a problem with your keyboard: it inserts multiple "..." characters
Previous Topic: RAC in a laptop (topics merged and moved by moderator))
Next Topic: is there any way/tool to connect clinet to RAC on single node
Goto Forum:
  


Current Time: Thu Mar 28 12:47:07 CDT 2024