ORA-02049: Timeout: distributed transaction waiting for lock
OracleWhat does it mean?
A distributed transaction exceeded DISTRIBUTED_LOCK_TIMEOUT while waiting for a lock on the remote database. The transaction timed out.
Why does it happen?
A transaction running over a database link waits for a locked row on the remote side; long transactions in the remote session, network latency, or conflicting locks held on both ends.
How to fix it
Find and resolve the blocking lock and session on the remote database (v$lock, v$session). Keep distributed transactions short and acquire the required locks as late as possible. If necessary, increase DISTRIBUTED_LOCK_TIMEOUT for the workload (SPFILE, restart required). For in-doubt distributed transactions, examine the DBA_2PC_PENDING view and resolve them manually if necessary.
More from this engine
- ORA-28000The account is locked
- ORA-01578Oracle data block corrupted (file #, block #)
- ORA-01722Invalid number
- enq: TX - row lock contentionWait: session blocked on a row-level lock held by another transaction
- log file syncWait: session waiting for LGWR to flush redo to disk on commit
- db file sequential readWait: single-block physical read, typically an index or table lookup
- db file scattered readWait: multi-block physical read, typically a full table or index fast full scan