Monday, June 2, 2014

ORA-02049: timeout: distributed transaction waiting for lock

Very interesting error message coming on my database while trying to update a table using database link

ORA-02049: timeout: distributed transaction waiting for lock
ORA-02063: preceding line from <Database Link Name>

Oracle uses a parameter distributed_lock_timeout if you are using a database link to update some objects. If there are already exists row lock on table and you are trying to acquire the lock on those rows then the wait will be for the number of seconds specified in parameter distributed_lock_timeout.

The solution is remove the locks on table.


No comments: