Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








ORA-02049: timeout: distributed transaction waiting for lock tips

Oracle Tips by Burleson Consulting

November 17, 2011

Question:  I am getting an intermittent ORA-02049: timeout: distributed transaction waiting for lock error?  How do I keep the ORA-02049 from happening?

Answer:  Are you closing your database links with dbms_session.close_database_link? 

See MOSC note: 1018919.102 and look at adjusting your distributed_lock_timeout value and distributed_recovery_connection_hold_time.

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

Cause: The time to wait on a lock in a distributed transaction has been exceeded. This time is specified in the initialization parameter DISTRIBUTED_LOCK_TIMEOUT.

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.

Oracle connections remains open until you end your local session or until the number of database links for your session exceeds the value of OPEN_LINKS. To reduce the network overhead associated with keeping a database link open, then use this clause to close the link explicitly if you do not plan to use it again in your session.

Oracle MOSC describes an issue with ORA-02049 in which the error occurs along with ORA-01403 in DBMS_REPCAT.EXECUTE.  Here is an example of ORA-02049 occurring in this context:

ksedmp: internal or fatal error
ORA-02049: timeout: distributed transaction waiting for lock
ORA-06512: at "SYS.DBMS_DEFER_INTERNAL_SYS", line 193
ORA-02063: preceding 2 lines from DATA_HK_PROD
ORA-01403: no data found
ORA-06512: at "ACTSLAB.COMPANY_TAT$RP", line 168
ORA-01085: preceding errors in deferred rpc

This ORA-02049 happens as you attempt to run DBMS_REPCAT.EXECUT in a particular job or manually.

To resolve ORA-02049, you would need to increase the SHARED_POOL_SIZE value in init.ora .  If you find that the shared pool is large enough and the ORA-02049 error continues to exist, you may also want to try flushing the shared pool with ALTER SYSTEM FLUSH SHARED_POOL; to free even more space.

This should resolve ORA-02049 in this context because errors logged in DEFERROR actually use the SYS.DBMS_DEFER_INTERNAL_SYS package.  Because it is big, the SYS.DBMS_DEFER_INTERNAL_SYS package can't be loaded in a shared pool when there is an error such as ORA-02049.  This being, the package can load if the shared pool is flushed or the SHARED_POOL_SIZE is increased.


Ihis Oracle Forum thread offers further information regarding the ORA-02049 error.  Here, ORA-02049 is said to sometimes be caused by a transaction that waited for a locked object for so long that it times out. 

Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.