|
-
Hi
From metalink:
Error: ORA 2049
Text: timeout: distributed transaction waiting for lock
-------------------------------------------------------------------------------
Cause: Exceeded ISTRIBUTED_LOCK_TIMEOUT> 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|