IBM Books

Replication Guide and Reference


Setting up your replication environment

After you design the replication model, you must set up your replication environment. These steps are involved in setting up your replication environment:

  1. Setting up the system

  2. Defining the replication criteria

  3. Performing the initial replication
Setting up your replication environment contains detailed instructions on setting up your replication environment. The rest of this section introduces the steps involved in setting up your environment.

Setting up the system

To set up the system, you perform the following steps:

  1. Migrate from previous releases of DataPropagator products.

  2. Grant access to the proper user IDs.

Setting up the replication criteria

To set up the replication criteria, you perform the following steps:

  1. Configure the administration tool. For example, if you are using DJRA, you need to associate passwords with databases.

  2. Customize and create replication control tables.

  3. Customize change data (CD) tables. This step is optional. You can change the default name and table space of your CD tables. If you are using the DB2 Control Center, you must customize your CD tables before you define a replication source. If you are using the DJRA tool, you customize the CD tables when you define the replication source.

  4. Define replication sources. This step includes identifying the table or view from which you want data copied and the types of changes that you want captured.

  5. Define subscription sets and subscription-set members. This step includes associating the replication source with the target to which you want the changes replicated. You can define subscription sets at any time prior to starting the Apply program.

  6. Configure the Capture program. This step includes enabling the source server for logging; it also includes creating and binding the Capture program package to the source server.

  7. Configure the Apply program. This step includes creating and binding the Apply program package to the source server; it also includes creating and binding the Apply program to the target server.

Performing the initial replication

Important: When you set up your replication environment, you must start the Capture program and let it initialize fully before you start any Apply programs.

To perform the initial replication, you must perform the following steps in the exact order:

  1. Make sure that at least one replication source is defined.

  2. Start the Capture program. This step includes specifying invocation parameters (such as NOPRUNE, which prevents automatic pruning of the CD and UOW tables). After the Capture program is fully initialized, it will not capture any changes until the Apply program signals it to do so.

  3. If you haven't already done so, define at least one subscription set.

  4. Start one or more Apply programs. This step includes specifying invocation parameters (such as LOADX, which calls ASNLOAD--an exit routine to initialize target tables). Each Apply program will perform a full-refresh copy for all subscription-set members and the Capture program will begin capturing changes for the associated replication sources.

  5. After the replication process starts, you can stop and start the Capture and Apply programs as often as you want. You can stop one or both of them, in any order, as long as you always restart the Capture program using the WARM or WARMNS option.
Tip:Use the WARMNS option if you want to be able to repair any problems (such as unavailable databases or table spaces) that might prevent a warm start from occurring.

Adding to your replication environment

You probably need to add replication sources and subscription sets to your replication environment from time to time.

To add to your replication environment, you must perform the following steps in the exact order:

  1. Define the new replication source.

  2. Run the Capture reinit command, or stop the Capture program and warm start it.

  3. Define the new subscription sets.

  4. If an Apply program is already running and it uses the Apply qualifier that is associated with the new subscription set, the Apply program will automatically recognize the new subscription set. Otherwise, you must start a new Apply program using the appropriate Apply qualifier before the Apply program can recognize the new subscription set.

Copying your replication environment

After you define your replication environment on one system (for example, a test system), you can copy the replication environment to another system (for example, a production system). You would use the promote functions to reverse-engineer your tables, replication sources, and subscription sets and to create a script file with the appropriate data definition language (DDL) and data manipulation language (DML). For more information about the promote functions, see Copying your replication configuration to another system and the online help for the administration interface.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]