ORA-02049: timeout: distributed transaction waiting for lock

coolFirst time encountering this error. The wrong name is great, points! cloth! Mode! Transactions wait for locks.

 

How can such a high-end mistake be made. Ha ha.

Check the reason when using dblink to connect to the remote database for writing. 1) Unexpected interruption. 2) The network is unstable.

 

Viewed locked table

select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;

 It is AC83. 

Tried to kill the process, failed. Hint: There is no such dialogue.

 

After tossing for about half an hour, and then querying the lock table situation, it was gone! ?

 

Then insert through dblink. write successfully

---==============My own understanding==========

Guess 1: The network is unstable, causing the transaction to succeed without interruption. Even if plsqldev has been successfully closed locally, the database on the remote side has not completed the rollback action.

So then open the view and you will see that the table is locked. After the subsequent waiting time, the transaction processing of the table by the remote database is completed. The lock is automatically released, and you can continue to operate on the table.

 

Guess 2: Others are operating the table at the same time, and the transaction is not committed. Subsequent submission.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326279738&siteId=291194637