Skip to main content Skip to complementary content

Prerequisites

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

Driver setup

Supported drivers

Replicate supports driver versions 11.5.6 and 11.5.8 only. The setup instructions are for version 11.5.8.

Replicate on Windows

  1. Download the IBM Data Server Client 11.5.8 (v11.5.8_ntx64_client.exe) from IBM Fix Central.
  2. Install it on the Qlik Replicate Server machine.

Replicate server on Linux

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

  1. Download the IBM Data Server Driver for ODBC and CLI 11.5.8 (v11.5.8_linuxx64_server_dec.tar.gz) from IBM Fix Central.

  2. Stop the Replicate service:

    ./areplicate stop
  3. Optionally, confirm that the service has stopped:

    ./areplicate status
  4. Install v11.5.8_linuxx64_server_dec.tar.gz and choose the “CLIENT” option.
  5. 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/V11.5/instance/db2icrt <db2_instance_name>

  6. Change the working directory to <Replicate_Install_Dir>/bin.

  7. Add the DB2 driver location to the Linux library path.

    To do this, add the following line to the site_ arep_login.sh file as follows:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/lib

    where path is the CLIENT path to the driver.

    Example (with db2clnt1 as the instance name):

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/db2clnt1/sqllib/lib:/home/db2clnt1/sqllib/lib64/gskit

    export DB2INSTANCE=db2clnt1

  8. Optionally, confirm that the driver location was copied:

    cat site_arep_login.sh
  9. Add the following entry to the odbcinst.ini file under /etc:

    [IBM DB2 ODBC DRIVER]

    Driver = /home/db2clnt1/sqllib/lib/libdb2o.so

    fileusage=1

    dontdlclose=1

  10. Start the Replicate service:

    ./areplicate start
  11. Optionally, confirm that the service has started:

    ./areplicate status
  12. 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

  • 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 privilege) in the endpoint settings or you can do this manually.

Information note

When the Automatically enable Data Capture Changes (requires admin privilege) 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 CHANGEs 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!