Exception: ORA-01591: Lock held by problematic Distributed Transaction Handling 10.19.142615

Source: Internet
Author: User

Execute several Delete statements today. One of the delete statements deletes the tables of another database through transparent gateway. This error is displayed after the execution of the results. When you query the rows deleted from other deleted tables, the pop-up window is locked by the distributed transaction and cannot be operated.

Final reference:

Manually committing an in-doubt transaction

Before attempting to commit the transaction, ensure that you have the proper privileges. Note the following requirements:

 

If the transaction was committed by... then you must have this privilege...

You

Force transaction

 

Another user

Force any transaction

 

 

Committing using only the transaction ID

The following SQL statement commits an in-doubt transaction:

 

Commit force 'transaction _ id ';

 

 

The variable transaction_id is the identifier of the transaction as specified in either the local_tran_id or global_tran_id columns of the dba_2pc_pending data dictionary view.

 

For example, assume that you query dba_2pc_pending and determine that local_tran_id for a distributed transaction is :45. 13.

 

You then issue the following SQL statement to force the commit of this in-doubt transaction:

 

Commit force '1. 45.13 ';

 

Committing using an SCN

Optionally, you can specify the SCN for the transaction when forcing a transaction to commit. This feature allows you to commit an in-doubt transaction with the SCN assigned when it was committed at other nodes.

 

Consequently, you maintain the synchronized commit time of the Distributed Transaction even if there is a failure. Specify an SCN only when you can determine the SCN of the same transaction already committed at another node.

 

For example, assume you want to manually commit a transaction with the following global transaction ID:

 

Sales. Acme. com.55d1c563.1.93.29

 

First, query the dba_2pc_pending view of a remote database also involved with the transaction in question. note the scn used for the commit of the transaction at that node. specify the SCN when committing the transaction at the local node. for example, if the SCN is 829381993, issue:

 

Commit force 'sales. Acme. com.55d1c563.1.93.29 ', 829381993;

 

See also:

Oracle9i SQL reference for more information about using the commit statement

 

 

Manually rolling back an in-doubt transaction

Before attempting to roll back the in-doubt distributed transaction, ensure that you have the proper privileges. Note the following requirements:

 

If the transaction was committed by... then you must have this privilege...

You

Force transaction

 

Another user

Force any transaction

 

 

The following SQL statement rolls back an in-doubt transaction:

 

Rollback force 'transaction _ id ';

 

 

The variable transaction_id is the identifier of the transaction as specified in either the local_tran_id or global_tran_id columns of the dba_2pc_pending data dictionary view.

 

For example, to roll back the in-doubt transaction with the local transaction ID of 2.9.4, use the following statement:

 

Rollback force '2. 9.4 ';

 

Official notes

Execute the statement:

Commit force '10. 19.142615 ';

Then query and OK to solve the problem.

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.