Replication Guide and Reference
After you design the replication model, you must set up your
replication environment. These steps are involved in setting up your
replication environment:
- Setting up the system
- Defining the replication criteria
- 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.
To set up the system, you perform the following steps:
- Migrate from previous releases of DataPropagator products.
- Grant access to the proper user IDs.
To set up the replication criteria, you perform the following
steps:
- Configure the administration tool. For example, if you are using
DJRA, you need to associate passwords with databases.
- Customize and create replication control tables.
- 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.
- 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.
- 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.
- 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.
- 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.
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:
- Make sure that at least one replication source is defined.
- 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.
- If you haven't already done so, define at least one subscription
set.
- 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.
- 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.
|
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:
- Define the new replication source.
- Run the Capture reinit command, or stop the Capture program and
warm start it.
- Define the new subscription sets.
- 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.
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 ]