Coding methods for distributed data

You can access distributed data by using three-part table names or explicit connect statements.

Three-part table names are described in Accessing distributed data by using three-part table names. Explicit connect statements are described in Accessing distributed data by using explicit CONNECT statements.

These two methods of coding applications for distributed access are illustrated by the following example.

Spiffy Computer has a main project table that supplies information about all projects that are currently active throughout the company. Spiffy has several branches in various locations around the world, each a Db2 location that maintains a copy of the project table named DSN8C10.PROJ. The main branch location occasionally inserts data into all copies of the table. The application that makes the inserts uses a table of location names. For each row that is inserted, the application executes an INSERT statement in DSN8C10.PROJ for each location.

Copying a table from a remote location

To copy a table from one location to another, you can either write your own application program or use the Db2 DataPropagator product.