Skip to main content Skip to complementary content

Prerequisites

The following section describes the prerequisites for working with the IBM DB2 for LUW endpoint.

Client prerequisites

Qlik Replicate server on Windows

IBM Data Server Client version 11.5 must be installed on the Qlik Replicate Server machine.

Qlik Replicate server on Linux

The following steps need to be performed on the Replicate machine:

  1. Install 11.5xx_linuxx64_server_t.tar.gz; choose to install “CLIENT”.
  2. If the Replicate machine does not have a DB2 instance, create a DB2 instance by running the following commands:

    adduser <db2_instance_name>

    /opt/ibm/db2/V 11 .5/instance/db2icrt <db2_instance_name>

  3. Add the DB2 driver location to the Linux library path. To do this, add the following line to the site_ arep_login.sh file:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path/lib64

    where path is the path to the driver.

    Example:  

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ibm/db2/V11.5/lib64

  4. Create a new file named odbcinst.ini under /etc and add the following entry:

    [IBM DB2 ODBC DRIVER]

    Driver = /opt/ibm/db2/V11.5/lib64/libdb2o.so

    fileusage=1

    dontdlclose=1

  5. Change to the Replicatebin directory (<install_dir>/bin). Then stop and start the Replicate service:

    ./areplicate stop
    ./areplicate start
  6. Define the IBM DB2 for LUW connection settings as described in Setting general connection properties and click Test Connection.

    If you get the following error:

    Cannot connect to DB2 LUW Server ODBC unknown error.

    RetCode: SQL_ERROR SqlState: NativeError: -1390 Message: [unixODBC][IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3". ODBC general error.

    1. Run the following command:

      /opt/ibm/db2/V11.5/bin /db2cli writecfg add -database <db_name_from_endpoint_connection_settings> -host <server_name_from_endpoint_connection_settings> -port <port_from_endpoint_connection_settings>

    2. Change to the Replicatebin directory (<install_dir>/bin). Then. stop and start the Replicate service:

      ./areplicate stop
      ./areplicate start

IBM DB2 for LUW server prerequisites

To enable CDC (Change Data Capture):

  • Set the database to be recoverable - To capture changes, Replicate requires the database to be configured as recoverable. A database is recoverable if either or both of the database configuration parameters LOGARCHMETH1 and LOGARCHMETH2 are not set to OFF.
  • Permissions - The Qlik user must be granted the following permissions:

    • SYSADM or DBADM

    • DATAACCESS

  • Change Data Capture: To enable data capture from IBM DB2 for LUW, the source tables need to be created as follows:

    CREATE / ALTER TABLE table-name …. DATA CAPTURE CHANGES [INCLUDE LONGVAR COLUMNS];

    You can either configure Replicate to perform this operation by selecting Automatically enable Data Capture Changes (requires admin privileges) or you can do this manually by selecting Let DBA set up data capture in the Advanced tab.

Information note

When the Automatically enable Data Capture Changes (requires admin privileges) option is selected, Replicate performs the ALTER TABLE operation when the task starts to run. If a new table that matches the table selection pattern is added (to the source database) while the task is already running, Replicate will only capture changes from it if it was created with the DATA CAPTURE CHANGE attribute described above.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!