Consultor Eletrônico



Kbase P17173: Is two-phase commit mandatory when databases on same PC are
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/03/2003
Status: Unverified

GOAL:

Is two-phase commit mandatory when databases on same PC are updated with the same transaction?

FIX:

It is not strictly necessary to run Two-Phase Commit when updating two separate databases located on the same machine via a single transaction.

There are advantages to using a Two-phase commit even if the databases are on the same machine (which in itself reduces the risk). For instance, should a transaction fail to commit on one of the databases, a shutdown and rollback would have to be done on both databases in order to restore integrity. With Two-phase commit in place, if a transaction fails to commit on one of the databases, then the failed transaction would be stored in a limbo state but one which could eventually be resolved at a later time.

But with or without Two-Phase Commit, After-Imaging should be run. Thanks to the option "endtime" for the Roll Forward process you can synchronise the two databases after a problem has occurred on one of them; while having Two-Phase Commit on, you would use the option "endtrans" for roll forwarding.