Distributed transaction error ORA-02049: time-out: distributed transaction waiting for lock
Problem
While working with dblinks, I got the below error:
ORA-02049: time-out: distributed transaction waiting for lock
Cause
More than one session is accessing the remote object.
Solution
I had issued commit, rollback for one of the session and the issue is resolved.
But, the key thing here is that; I could only reproduce the error while issueing below statement:
insert /*+ APPEND PARALLEL(4)*/ into admin.test2 select /*+ DRIVING_SITE(T) PARALLEL(4) */ * from admin1.test2@MYDB2.WORLD T where 1=1 ;
While trying it without APPEND hint it does not occur.
Honestly speaking, I did not know the real cause, because sometimes I could not reproduce the error.
The transactions are not listed in:
select * from dba_2pc_pending; select * from dba_2pc_neighbors;
Categories: problem-cause-solution
distributed transaction, ORA-02049