When the two-phase commit protocol is used

A database server automatically uses the two-phase commit protocol for any transaction that modifies data on multiple database servers.

For example, suppose three database servers that have the names australia, italy, and france, are connected, as shown in the following figure.
Figure 1. Connected database servers
This figure is described in the surrounding text.
If you run the commands shown in the following example, the result is one update and two inserts at three different database servers.
CONNECT TO stores_demo@italy
   UPDATE stores_demo:manufact SET manu_code = 'SHM' WHERE manu_name = 'Shimara'
   INSERT INTO stores_demo@france:manufact VALUES ('SHM', 'Shimara', '30')
   INSERT INTO stores_demo@australia:manufact VALUES ('SHM', 'Shimara', '30')

Copyright© 2019 HCL Technologies Limited