Setting Up Connectivity to a DB2 UDB Server

Replication Agent for IBM DB2 Universal Database (UDB) must be installed on the same UNIX or Microsoft Windows host as the primary UDB server or the UDB Administration Client. Replication Agent requires access to UDB JDBC drivers and UDB API libraries.

Note: The DB2 JDBC driver is effectively a JDBC/ODBC bridge. For each primary database, you must configure an ODBC datasource name (DSN) in the DB2 client software.

If the Replication Agent is installed on the same host machine as the DB2 Universal Database primary data server, a separate DB2 client is not required for connectivity.

If the Replication Agent host machine is not the same as the DB2 Universal Database host, you must install the DB2 Administration Client on the Replication Agent host machine.

See the IBM publication, DB2 Universal Database and DB2 Connect, Installation and Configuration Supplement.

  1. When you install a DB2 client on a UNIX platform, source db2cshrc to correctly set all required DB2 environment variables. On Linux and Windows only, if your DB2 installation is 64 bit, customize the script to point to the 32-bit client libraries. See the Replication Agent Primary Database Guide.
    Add the following to the .login file of the user account that starts and stops the Replication Agent instance:
    source /path_name/sqllib/db2cshrc

    where path_name is where you installed the DB2 client. Log back in for this change to take effect, or issue the command source .login after the change.

    Note: When you install a DB2 client on Microsoft Windows, the installation program automatically modifies all required environment variables.
  2. For each primary database (regardless of platform), you must configure an ODBC datasource name (DSN) in the DB2 client software. Make a note of the database name and datasource name when you configure the datasource.
    Record the database name and datasource name in the following Replication Agent configuration parameters:
    • pds_database_name – primary database name.

    • pds_datasource_name – cataloged database alias or the ODBC datasource name for the primary database.