ORA-02049: Timeout: Distributed Transaction Processing waiting for Lock diagnostics

Source: Internet
Author: User

ORA-02049: Timeout: Distributed Transaction Processing waiting for Lock diagnostics

In the formal environment, there are two databases A and B. dblink is built on Database A. The business is to update some tables in database A to database B through dblink, always reports an error when updating: ORA-02049: Timeout: Distributed Transaction Processing wait timeout.

Before I wrote A blog: ORA-02049: Timeout: Distributed Transaction Processing wait lock simulation, roughly means that through A to update the data in B, because the data in database B has A lock, if it is not released, an error is returned through update.

The diagnosis is as follows:

Run the command on Database B to find the session that generates the lock.

Select s. owner, s. object_name, l. SID, l. TYPE, l. LMODE, l. REQUEST, l. BLOCK
From gv $ lock l, dba_objects s
Where l. ID1 = s. object_id
And s. object_name = 'test ';.

Find the locked session information, and then use osuser and machine to find the specific application. Stop the application and then perform the test.
Select sid, username, schemaname, osuser, machine, program from gv $ session where sid = 1142;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.