What is Two-Phase Commit ?

Two-phase  commit  is  mechanism  that guarantees a distributed transaction either commits on all involved nodes or rolls back on all involved nodes to maintain  data  consistency  across the global distributed database. It has two phase, a Prepare Phase and a Commit Phase.

Showing Answers 1 - 3 of 3 Answers

Two phase commit is applicable in a Distributed or In-Doubt Transactions. The
two-phase commit mechanism is applicable in a Distributed or In-Doubt
Transactions. If the Distributed transaction fails because of a system or
network error, The transaction becomes in-doubt.

Distributed transactions can become in-doubt in the following ways:



  • A server machine running Oracle software crashes. A network connection between two or more Oracle databases involved in distributed processing is disconnected.  An unhandled software error occurs.

  • The RECO process automatically resolves in-doubt transactions when the machine, network, or software problem is resolved. Until RECO can resolve the transaction, the data is locked for both reads and writes. Oracle blocks reads because it cannot determine which version of the data to display for a query.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions