DBAtlas · Database operations atlas

ORA-02049: Timeout: distributed transaction waiting for lock

Oracle

What 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.

Open in DBAtlas →

More from this engine