Translate

Search This Blog

ORA-02049: timeout: distributed transaction waiting for lock

This error comes when DML statement waits for a row level lock in remote database and distributed transaction waiting time is timed out, which defaults to 60 seconds specified by init parameter distributed_lock_timeout. In all cases, it involves DB links (distributed transactions)

SQL> update emp@rep1 set deptno=20 where empno=7789;
update emp@rep1 set deptno=20 where empno=7789;
*
ERROR at line 1:
ORA-02049: timeout: distributed transaction waiting for lock
ORA-02063: preceding line from REP1

SQL> show parameter distri
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------
distributed_lock_timeout             integer     60

Action: : This situation is treated as a deadlock and the statement was rolled back. To set the time-out interval to a longer interval, adjust the initialization parameter DISTRIBUTED_LOCK_TIMEOUT, then shut down and restart the instance.