Two-phase commit (2PC) is a protocol ensures consistency across distributed databases in which each participant in the transaction commit operation votes on whether to commit the changes. Participants wait before committing a change until all participants can commit.
A participant performs some work on behalf of the transaction and commits or rolls back changes. A participant can also coordinate participants at a lower level.
By voting to commit, a participant guarantees that it can either commit or roll back its part of the transaction, even if it fails before receiving the result of the vote.
The 2PC protocol allows the development of Customer Information Control System (CICS) and Information Management System (IMS) applications that can update one or more databases in a synchronized manner. Each database can be either a Teradata Database or a database under another DBMS. The result is that all updates requested in a defined unit of work will either succeed or fail.