5.3.1 Introduction
SQL replication allows you to replicate data from DB2 sources to targets by using two programs: Capture and Apply. The Capture program runs on the source system. The Capture program reads DB2 recovery logs for changed source data and saves the committed changed data to staging tables. The Apply program typically runs on the target system. The Apply program retrieves captured data from staging tables and delivers the data to targets. Both programs use a set of DB2 tables to track the information that they require to do their tasks and to store information that they generate themselves, such as information that you can use to see how well they are performing. You create these tables before you tell SQL replication what are your replication sources and targets. Figure 5-3 shows the infrastructure for a simple configuration of DB2 SQL replication.
Figure 5-3 Infrastructure for a simple configuration of DB2 SQL replication
The infrastructure is:
- The Capture program uses a set of DB2 tables called capture control tables. These tables contain information about replication sources and the current position of the Capture program in the DB2 recovery log. In most cases, the control tables for a Capture program need to be on the same DB2 server as the sources associated with the program.
- The Apply program uses a set of DB2 tables called apply control tables. These tables contain information about your targets and where their corresponding sources are located. The control tables for the Apply program usually reside on the system where the Apply program runs. Unlike with the Capture program, you can create multiple Apply programs that use the same set of control tables. Each Apply program is identified in these control tables by a name called an apply qualifier.
xxxx