IBM Books

Replication Guide and Reference


Setting up the Capture and Apply programs

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.

Configuring the Capture program for UNIX platforms

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:

  1. Log on with the user ID that has sufficient privileges.

  2. Connect to the source server database by entering:
    db2 connect to database
    

    where database is the source server database.

  3. Prepare the source server 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 backup database database_alias
    
    or:
    db2 update database configuration for database_alias using userexit on
    db2 backup database database_alias
    
    You might need to increase DBHEAP, APPLHEAPSZ, PCKCACHESZ, LOCKLIST, and LOGBUFSZ based on your installation requirements.

  4. Change to the directory where the Capture program bind files are located, which is usually $HOME/sqllib/bnd.

  5. 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.

    These commands create a list of packages, the names of which are in the file CAPTURE.LST.

Configuring the Apply program for UNIX platforms

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:

  1. Log on with the user ID that has sufficient privileges.

  2. Change to the directory where the Apply program bind files are located, which is usually $HOME/sqllib/bnd.

  3. Connect to the source server database by entering:
    db2 connect to database
    
    where 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
    

  4. Create and bind the Apply program 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 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.

  5. Connect to the target server database by entering:
    db2 connect to database
    
    where database is the target server database.

  6. Create and bind the Apply program package to the target server database by entering the following commands:
    db2 bind @applycs.lst isolation cs blocking all grant public
    
    db2 bind @applyur.lst isolation ur blocking all grant public
    
    Because 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.

  7. Repeat the connect and bind steps for each server that the Apply program connects to. You must bind the Apply program to all source, target, and control servers.

Other configuration considerations for UNIX-based components

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.

Providing end-user authentication at the source server

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:

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.


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

[ DB2 List of Books | Search the DB2 Books ]