What is a two-phase commit ?
Database on other servers can be updated and those transactions can be grouped together with others in a logical unit is called two-phase commit. They are The Preparation Phase : An initiating node called the global coordinator notifies all sites involved in the transaction to be ready either commit or rollback the transaction. The Commit Phase : If there is no problem with prepare phase, then all sites commit their transactions. If a network or node failure occurs, then all sites rollback their transactions. 3.