DB2 Replication Guide and Reference
Setting up consists of configuring the source, target, and control servers. The following sections provide instructions for configuring each
server as well as information about providing end-user authentication at the
source server.
- Ensure that the user ID under which the Capture program is running has the
required privileges:
- Execute privilege on the Capture packages
- DBADM or SYSADM privileges for the source, control, and target servers
- Log on with the user ID that has sufficient privileges.
- Connect to the source server database by entering:
db2 connect to database
where database is the source server database.
- Prepare the source server database (source database) for roll-forward
recovery by issuing the update database configuration command and
the backup database command. For example:
db2 update database configuration for database_alias using logretain on
db2 update database configuration for database_alias using userexit on
db2 backup database database_alias
Note: | You might need to increase DBHEAP, APPLHEAPSZ, and LOGBUFSZ based on your
installation requirements.
|
- Change to the directory where the Capture program bind files are located,
which is usually $HOME/sqllib/bnd.
- Create and bind the Capture program package to the source server database
by entering the following command:
db2 bind @capture.lst isolation ur blocking all
where ur specifies the list in uncommitted read format for greater
performance.
- Ensure that the user ID under which Apply is running has the required
privileges:
- Execute privilege for Apply packages
- DBADM or SYSADM privileges for the database
- Log on with the user ID that has sufficient privileges.
- Change to the directory where the Apply program bind files are located,
which is usually $HOME/sqllib/bnd.
- Connect to the source server database by entering:
DB2 CONNECT TO database
where database is the source server database.
- Create and bind the Apply package to the source server database by
entering both of the following commands:
db2 bind @applycs.lst isolation cs blocking all
db2 bind @applyur.lst isolation ur blocking all
Where:
- CS
- The list in cursor stability format.
- UR
- The list in uncommitted read format.
These commands create a list of packages, the names of which can be found
in the applycs.lst and applyur.lst files.
- Connect to the target server database by entering:
db2 connect to database
where database is the target server database.
- Create and bind the Apply package to the target server database by
entering both of the following commands:
db2 bind @applycs.lst isolation cs blocking all grant public
db2 bind @applyur.lst isolation ur blocking all grant public
Note: | Because the Apply control tables use static SQL calls, the Apply bind process
searches for nearly all of the control tables at each server that it is bound
to, regardless of whether these control tables have any use or meaning at each
server.
|
- Repeat the connect and bind steps for each server that the Apply program
connects to. You must bind the Apply program to the source, target, and
control servers.
Ensure that the user ID from which the Capture and Apply programs are
running has write privilege on the directories where you invoke the
programs. Write privilege is necessary because both the Capture and
Apply programs create files in the invocation directory.
The Capture program creates the following files:
- <instname><SRCSRVR>.CCP- A log file for the
messages issued by the Capture program; these messages are also recorded in
the trace table (asn.ibmsnap_trace).
- <instname><SRCSRVR>.TMP- Contains process
ID of this invocation of Capture (to prevent multiple Capture programs from
being invoked in the same instance to the same source server).
The Apply program creates the following files:
- <APPLYQUAL><instname><CNTLSRVR>.LOG-
A log file for the messages issued by the Apply program; contains the same
information as that in the apply trail table
(asn.ibmsnap_applytrail).
- ASNAPPLY<APPLYQUAL>.PID- Contains process ID of this
invocation of Apply (to prevent multiple Apply programs from being invoked
with the same Apply qualifier).
For all other issues pertaining to configuration of UNIX-based components,
see IBM DB2 Universal Database for UNIX Quick
Beginnings.
For end-user authentication to occur at the source server, in some cases
you need to provide a password file for Apply to use when connecting to the
source server. Following are environment-specific changes:
- If you installed Apply for HP-UX, Apply for Solaris, or Apply for UnixWare 7, you must use the AUTH=SERVER scheme and provide a password
file.
- If you installed Apply for AIX, you must provide a password file if you
want to use the AUTHENTICATION=SERVER scheme. If you use the
AUTHENTICATION=CLIENT scheme, you do not need to provide a password
file.
For more information about authentication and security, refer to the
IBM DB2 Universal Database Administration
Guide.
If you create a password file:
The password file must meet the following criteria:
- Be named as shown:
<APPLYQUAL><instname><CNTLSRVR>.PWD
Where:
- APPLYQUAL
- The Apply qualifier in upper case. The Apply qualifier is case
sensitive and must match the value of APPLY_QUAL in the subscription set
table.
- instname
- The instance name in lower case that Apply runs under. The value of
DB2INSTANCE.
- CNTLSRVR
- The name of the control server in upper case.
For example: DATADIRapply1REPRTDB.PWD
Note that this naming convention is the same as the log file name (.LOG) and the spill file name (.SPL),
but with a file extension of PWD.
- Reside in the directory from which the Apply program starts.
- Contain all server-name/password pairs for the file. This enables
you to use a different (or the same) password at each server. The Apply user ID is used for all connections.
- Have one or more records using the following format:
SERVER=server_name PWD=password USER=userid
Where server_name is the source, target, or control
database. The file cannot include blank lines or comment
lines.
It is advisable to limit read access of this file to the user ID that will
run Apply.
If you do not create a password file:
Apply for UNIX-based platforms must be able to issue an SQL CONNECT
statement without specifying the user ID and password. To do so, ensure
that:
- The DB2 for MVS database is catalogued as AUTHENTICATION=CLIENT.
- The login ID belongs to PRIMARY GROUP=SYSTEM.
When copying from DB2 for MVS sources, ensure that:
- SECURITY=SAME for MVS CPI-C node.
- You specify the following values when you define the LU name via the VTAM
APPL:
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]