Multisite updates (two phase commit) in CLI applications
You can use the multisite update function to update data in multiple remote database
servers with integrity. Db2® database products
provide comprehensive support for multisite updates.
A typical transaction scenario portrays an application which interacts with only one database server in a transaction. Even though concurrent connections allow for concurrent transactions, the different transactions are not coordinated.
Note: Multisite update is also known as Distributed Unit of Work (DUOW).
A typical banking transaction is a good example of a multisite update. Consider the transfer of money from one account to another in a different database server. In such a transaction it is critical that the updates that implement the debit operation on one account do not get committed unless the updates required to process the credit to the other account are committed as well. Multisite update considerations apply when data representing these accounts is managed by two different database servers
Some multisite updates involve the use of a transaction manager
(TM) to coordinate two-phase commit among multiple databases. CLI applications
can be written to use various transaction managers:
- Db2 as transaction manager
- Process-based XA-compliant transaction program monitor
- Host and IBM®
Power Systems
database servers Note: There is no specific Db2 CLI/ODBC client configuration required when connecting to a host or IBM Power Systems database server, although the machine running Db2 Connect might require certain configuration settings to enable running multisite update mode against the host.