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

Replicate supports driver version 12.1.x only. The instructions assume you are installing version 12.1.4.

Information noteTo download the drivers, you must have an IBM account.

Replicate on Windows

Information noteIBM Data Server Client 12.1.3 and later requires Windows Server 2022 or later.
  1. Download IBM Data Server Client 12.1.4 (v12.1.4_ntx64_client.exe) from IBM Fix Central.
  2. Install it on the Qlik Replicate Server machine.

Replicate server on Linux

Information noteIBM Data Server Client 12.1.3 and later requires Red Hat Enterprise Linux 10.x (64-bit) or later.

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

  1. Download the IBM Data Server Driver for ODBC and CLI 12.1.4 (v12.1.4_linuxx64_odbc_cli.tar.gz) from IBM Fix Central.

  2. Stop the Replicate service and optionally confirm that it has stopped as described in Replicate server procedures.

  3. Unzip v12.1.4_linuxx64_odbc_cli.tar.gz and extract the files. Then run the installation, choosing the “CLIENT” option.

    For guidance, see Installing the Db2 driver package on Linux.

  4. 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/V12.1.4/instance/db2icrt <db2_instance_name>

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

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

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

    cat site_arep_login.sh
  8. 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

  9. Start the Replicate service and optionally confirm that it has started as described in Replicate server procedures.

  10. 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/V12.1.4/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 Replicate bin directory (<install_dir>/bin). Then, stop and start the Replicate service as described in Replicate server procedures.

IBM DB2 for LUW server prerequisites

The following permissions must be granted to the user specified in the endpoint settings:

  • SCHEMAADM privilege on target schemas. This allows Replicate to create, delete, and update tables in the target schemas.

  • The IBM LOAD command run by Replicate requires:

    • DATAACCESS authority on the database and relevant schemas (included in the SCHEMAADM).

    • LOAD authority on the database or the schemas with the following privileges:

      • INSERT or INSERTIN privilege on the table.

      • INSERTIN privilege on the schema that contains the exception table, if used.

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 – please let us know!