Use the COMMIT or ROLLBACK statement with the FORCE option and a text string that indicates either the local or global transaction ID of the in-doubt transaction to commit. This section contains the following topics:
Manually Committing an In -Doubt Transaction
Before attempting to commit the transaction, ensure that you have the proper privileges. Note the following requirements:
Committing Using Only the Transaction ID
The following SQL statement commits an in-doubt transaction:
COMMIT FORCE 'transaction_id';User Committing the Transaction Privilege Required TABLE
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 1: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 lets you 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.29First, 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;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:
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';
|
|
Oracle 10g Related Tutorials |
|
---|---|
Oracle 9i Tutorial | Oracle 8i Tutorial |
Informatica Tutorial | Oracle 11g Tutorial |
Oracle 10g Related Interview Questions |
|
---|---|
Oracle 10g Interview Questions | Oracle 9i Interview Questions |
Oracle 8i Interview Questions | Informatica Interview Questions |
PL/SQL Interview Questions | Oracle 11g Interview Questions |
SQL Interview Questions | Oracle apps Interview Questions |
Sybase Interview Questions | Oracle Apps ERP Interview Questions |
Oracle 7.3 Interview Questions | Oracle Access Manager Interview Questions |
Oracle Application Framework Interview Questions | Oracle Apps DBA Interview Questions |
Oracle 10g Related Practice Tests |
|
---|---|
Oracle 10g Practice Tests | Oracle 9i Practice Tests |
Oracle 8i Practice Tests | Informatica Practice Tests |
PL/SQL Practice Tests | Oracle 11g Practice Tests |
SQL Practice Tests | Oracle apps Practice Tests |
Sybase Practice Tests | Oracle Apps ERP Practice Tests |
Oracle 7.3 Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.