# 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](https://www.ibm.com/support/fixcentral/swg/doSelectFixes?options.selectedFixes=DSClients-ntx64-client-12.1.4000.277-FP000&continue=1&source=dbluesearch).
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 9.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](https://delivery04-mul.dhe.ibm.com/sdfdl/v2/sar/CM/IM/0dslh/0/Xa.2/Xb.jusyLTSp44S03ZzHOjlaam-xyEdQTZWktu09QVhZXGp_0k990qTdw7sxSR0/Xc.CM/IM/0dslh/0/v12.1.4_linuxx64_odbc_cli.tar.gz/Xd./Xf.LPR.D1vk/Xg.13859184/Xi.habanero/XY.habanero/XZ.R6_3BeXrDHbg2iLP7Np3A5Fy9HkmYR9s/v12.1.4_linuxx64_odbc_cli.tar.gz).

2. Stop the Replicate service and optionally confirm that it has stopped as described in [Replicate server procedures](https://help.qlik.com/en-US/replicate/May2026/Content/Replicate/Main/Installation/Server_Procedures.htm).

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](https://www.ibm.com/docs/en/db2-warehouse?topic=installing-linux-powerlinux#taskconnect_driver_package_install_linux__steps__1).

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 &lt;Replicate\_Install\_Dir&gt;/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](https://help.qlik.com/en-US/replicate/May2026/Content/Replicate/Main/Installation/Server_Procedures.htm).

10. Define the IBM DB2 for LUW connection settings as described in [Setting general connection properties](https://help.qlik.com/en-US/replicate/May2026/Content/Replicate/Main/IBM-DB2-LUW-TARGET/set_up_ibm_db2_for_luw_db_as_target.htm) 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 (&lt;install\_dir&gt;/bin). Then, stop and start the Replicate service as described in [Replicate server procedures](https://help.qlik.com/en-US/replicate/May2026/Content/Replicate/Main/Installation/Server_Procedures.htm).

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