Set Distributed Lock Timeout in Oracle

ORA-02049 time-out: distributed transaction waiting for lock

I have observer that multiple clients communicating with the one Server table then Server put the lock to that table.

Resolution: You need to increase the “Distributed Lock Timeout” in seconds. (by default it set to 60 seconds) To update it you need to run the following command.

to view the Lock timeout :

SELECT name,value FROM v$parameter where NAME=’distributed_lock_timeout’ ;
ALTER SYSTEM SET distributed_lock_timeout=120 scope=spfile;
COMMIT;

To disable the ‘distributed_lock_timeout’ by giving the below command.

ALTER SYSTEM DISABLE DISTRIBUTED RECOVERY;
COMMIT;

It is strongly ADVISABLE that you enable the ‘distributed_lock_timeout’

ALTER SYSTEM ENABLE DISTRIBUTED RECOVERY;
COMMIT;

Now locktimeout has been changed to 120 Seconds.

Remember : While running any ALTER SYSTEM Command you need to restart the instance.

-Regards

Leave a comment