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.
Important: The Capture program is bound automatically during execution. Therefore, the following steps for binding the Capture program on UNIX are optional. If you want to specify options or check that all bind processes completed successfully, complete the following tasks:
db2 connect to database
where database is the source server database.
db2 update database configuration for database_alias using logretain on db2 backup database database_aliasor:
db2 update database configuration for database_alias using userexit on db2 backup database database_aliasYou might need to increase DBHEAP, APPLHEAPSZ, PCKCACHESZ, LOCKLIST, and LOGBUFSZ based on your installation requirements.
db2 bind @capture.lst isolation ur blocking all
where UR specifies the list in uncommitted read format for greater performance.
These commands create a list of packages, the names of which are in the file CAPTURE.LST.
Important: The Apply package is bound automatically during execution. Therefore, the following steps for binding the Apply package on UNIX are optional. If you want to specify options or check that all bind processes completed successfully, complete the following tasks:
db2 connect to databasewhere database is the source server database.
Note: | If the source server database is catalogued as a remote database, you might
need to specify a user ID and password on the db2 connect to
command. For example:
db2 connect to database user userid using password |
db2 bind @applycs.lst isolation cs blocking all
db2 bind @applyur.lst isolation ur blocking all
where cs specifies the list in cursor stability format, and ur specifies the list in uncommitted read format.
These commands create a list of packages, the names of which are in the files applycs.lst and applyur.lst.
db2 connect to databasewhere database is the target server database.
db2 bind @applycs.lst isolation cs blocking all grant public
db2 bind @applyur.lst isolation ur blocking all grant publicBecause the Apply program control tables use static SQL calls for the control tables, the Apply bind process searches for the control tables at each server that the Apply program is bound to, regardless of whether these control tables are used at a server.
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 in addition to the spill files:
The Apply program creates the following files:
For more information about configuration of UNIX-based components, see IBM DB2 Universal Database for UNIX Quick Beginnings.
In some cases you must provide a password file for end-user authentication to occur at the source server. The Apply program uses this file when connecting to the source server. Give read access only to the user ID that will run the Apply program. Following are environment-specific requirements:
Creating a password file:
The password file must meet the following criteria:
applyqual.PWD
Where applyqual is a case-sensitive string that must match the case and value of the Apply qualifier (APPLY_QUAL) in the subscription set table exactly.
For example: DATADIR.PWD
This naming convention is the same as the log file name (.app) and the spill file name (.nnn), but with a file extension of .pwd.
SERVER=server_name USER=userid PWD=password
Where:
If you do not create a password file:
The Apply program for UNIX must be able to issue an SQL CONNECT statement without specifying the user ID and password. If the Apply program needs to connect to an OS/390 database with SNA connectivity, these settings are necessary:
When you copy from DB2 for OS/390 sources, these settings are necessary:
For more information about authentication and security, refer to the IBM DB2 Universal Database Administration Guide.