-
All -
I am receiving the following error:
java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for lock.
I have increased the DISTRIBUTED_LOCK_TIMEOUT=300, to no avail (this is more than needed).
I have also tested each piece of the program (tcl script calling java program) and they run successfully.
Any suggestions on how to rid myself of this error?
Ryan
-
Hi
From metalink:
Error: ORA 2049
Text: timeout: distributed transaction waiting for lock
-------------------------------------------------------------------------------
Cause: Exceeded seconds waiting for lock.
Action: treat as a deadlock
*** Important: The notes below are for experienced users - See [NOTE:22080.1]
Explanation:
Ignore the "Action" above - this is non-sense.
Basically ORA 2049 is signalled if:
a) you are waiting on another sessions TX enqueue
(Eg: usually you are waiting for a row lock)
AND b) you are performing a distributed operation.
Eg: You are using a DB link for something, even if it is only a
select
AND c) You wait for longer than 'distributed_lock_timeout'
The use of a DB Link opens you up to distributed rules of operation
even if you only READ from it.
You can either increase the timeout OR handle the ORA 2049 as a 'try again'
exception that is not fatal. This mechanism exists to prevent deadlock
so any handling of 'TRY AGAIN' should include an escape clause to prevent
deadlock.
Example:
Session 1
~~~~~~~~~
Session 2
~~~~~~~~~
update t2@LINK set b=4 where b=3;
select * from dual@LINK;
update t2 set b=4 where b=3;
^^ ORA 2049
OR EVEN
update t2 set b=4 where b=3;
select * from dual@LINK;
update t2 set b=4 where b=3;
^^ ORA 2049
-
Thanks, but no success.
I am running Oracle 8.1.5 on Solaris 7... this was working one evening and then was not working the next morning. any suggestions?
R