In order for CDC Replication to
process journal entries from a remote journal, you must configure
remote journaling on your operating system. This sample procedures
illustrates how remote journaling could be configured.
About this task
The examples in the following procedure illustrate the required
parameters you must set on each system. See your System i® documentation for a description
of each command and a complete list of parameters.Before configuring
remote journaling, make sure you have performed the following actions:
- Installed CDC Replication on
the Data Origin Server. The following procedure refers to this system
as the CDC Replication Data
Origin Server.
- Installed CDC Replication on
the Source Server. The following procedure refers to this system as
the CDC Replication Source
Server.
- On the CDC Replication Source
Server, add a relational database directory entry by running the ADDRDBDIRE command. CDC Replication requires
that you give this database entry the same name as the name of the
machine. For example, the following command creates the relational
database directory entry on a machine named NEWYORK:
ADDRDBDIRE RDB(NEWYORK) RMTLOCNAME(*LOCAL)
- On the CDC Replication Data
Origin Server, add a relational database entry for the database on
the CDC Replication Source
Server by running the ADDRDBDIRE command. For example,
ADDRDBDIRE RDB(NEWYORK) RMTLOCNAME(192.168.0.10)
- On the CDC Replication Data
Origin Server, identify the journal you want to use for remote journaling.
For example, you may want to use TORLIB/MYJRN. If the journal does
not exist, you can create the journal using the following commands:
- On the CDC Replication Data
Origin Server, add a remote journal by running the ADDRMTJRN command. CDC Replication requires
that you do the following for this command:
- Set the relational database to the database directory entry you
created in Step 1.
- Set the names of the local journal and remote journal to the journal
you created in Step 3.
- Set the local journal library to the library of the journal you
created in Step 3.
- As a best practise, set the remote journal library to a library
that is different from the local journal library.
- Create both the local journal library and the remote journal library
on the CDC Replication Source
Server.
- Set the remote journal type to either *TYPE1 or *TYPE2.
For example, the following command creates the remote
journal NYLIB/MYJRN on the CDC Replication Source
Server:
ADDRMTJRN RDB(NEWYORK) SRCJRN(TORLIB/MYJRN) TGTJRN(NYLIB/MYJRN)
RMTRCVLIB (NYLIB) RMTJRNTYPE(*TYPE1)
- On the CDC Replication Data
Origin Server, activate the remote journal by running the CHGRMTJRN command
with the JRNSTATE(*ACTIVE) parameter. For example, the following command
activates the remote journal:
CHGRMTJRN RDB(NEWYORK) SRCJRN(TORLIB/MYJRN) TGTJRN(NYLIB/MYJRN)
JRNSTATE(*ACTIVE)