Updating a single database in a multi-database transaction
If your data is distributed across multiple databases, you may wish to update one database while reading from one or more other databases. This type of access can be performed within a single unit of work (transaction).
Before you begin
Note: If databases are located on a host or System i
database server, you require Db2 Connect for connectivity to
these servers.
About this task

Procedure
To set up a funds transfer application for this environment, you must:
- Create the necessary tables in the appropriate databases
- If physically remote, set up the database servers to use the appropriate communications protocols
- If physically remote, catalog the nodes and the databases to identify the databases on the database servers
- Precompile your application program to specify a type 2 connection (that is, specify CONNECT 2 on the PRECOMPILE command), and one-phase commit (that is, specify SYNCPOINT ONEPHASE on the PRECOMPILE command).