Prerequisites
Before you can land or replicate data, make sure to complete the following prerequisites:
-
Install the required driver on the Data Movement gateway server
Information noteThis is only required if you opted to work with Data Movement gateway. For information on the benefits of Data Movement gateway and when it is required, see Qlik Data Gateway - Data Movement.
-
Grant the required permissions on the data source
-
Configure the data source connector
Install the R4Z product on z/OS
Before you can work with an IBM DB2 for z/OS source, you must first install and configure the R4Z product on z/OS.
-
Go to Product Downloads.
-
Select Qlik Data Integration.
-
Scroll down the Product list and select Qlik Talend Data Integration.
-
In the Download Link column, click the QlikReplicate_2023.5.0.191_r4z.zip link to start your download.
-
Download R4Z and install it on your z/OS data source.
For installation and configuration instructions, see Installing and configuring R4Z.
Installing and setting up the driver
You can install the driver using the driver installation utility (recommended) or manually. Manual installation should only be attempted in the unlikely event that you encounter an issue with the driver installation utility.
Using the driver installation utility to install the driver
This section describes how to install the required driver. The process involves downloading the driver, copying it to the required folder (see below), and running a script that will automatically install and configure it. You can also run scripts to update and uninstall the driver as needed.
Preparing the installation
-
Make sure that Python 3.6 or later is installed on the Data Movement gateway server.
Python comes preinstalled on most Linux distributions. You can check which Python version is installed on your system, by running the following command:
python3 --version
-
Download the IBM Data Server Client "<version>_linuxx64_client.tar.gz" from the IBM web site. You can find the supported version under binary-artifacts in /opt/qlik/gateway/movement/drivers/manifests/db2.yaml. Once the download completes, copy the file to:
/opt/qlik/gateway/movement/drivers/db2
Installing the driver
To install the driver:
-
Stop the Data Movement gateway service:
sudo systemctl stop repagent
-
Optionally, confirm that the service has stopped:
sudo systemctl status repagent
The status should be as follows:
Active: inactive (dead) since <timestamp> ago
-
On the Data Movement gateway machine, change the working directory to:
opt/qlik/gateway/movement/drivers/bin
-
Run the following command:
Syntax:
./install db2
Otherwise, the EULA for the driver will be displayed.
-
Do one of the following:
- Press [Enter] repeatedly to slowly scroll through the EULA.
- Press the Spacebar repeatedly to quickly scroll through the EULA.
- Press q to quit the license text and be presented with the EULA acceptance options.
-
Do one of the following:
- Type "y" and press [Enter] to accept the EULA and begin the installation.
- Type "n" and press [Enter] to reject the EULA and exit the installation.
-
Type "v" and press [Enter] to view the EULA again.
-
Wait for the installation to complete (indicated by "Complete!") and then start the Data Movement gateway service:
sudo systemctl start repagent
-
Optionally confirm that the service has started:
sudo systemctl status repagent
The status should be as follows:
Active: active (running) since <timestamp> ago
The driver will be installed.
Updating the driver
Run the update command if you want to uninstall previous versions of the driver before installing the provided driver.
To update the driver:
-
Stop the Data Movement gateway service:
sudo systemctl stop repagent
-
Optionally, confirm that the service has stopped:
sudo systemctl status repagent
The status should be as follows:
Active: inactive (dead) since <timestamp> ago
-
On the Data Movement gateway machine, change the working directory to:
opt/qlik/gateway/movement/drivers/bin
-
Run the following command:
Syntax:
./update db2
Otherwise, the EULA for the driver will be displayed.
-
Do one of the following:
- Press [Enter] repeatedly to slowly scroll through the EULA .
- Press the Spacebar repeatedly to quickly scroll through the EULA.
- Press q to quit the license text and be presented with the EULA acceptance options.
-
Do one of the following:
- Type "y" and press [Enter] to accept the EULA and begin the installation.
- Type "n" and press [Enter] to reject the EULA and exit the installation.
- Type "v" and press [Enter] to review the EULA from the beginning.
-
Wait for the installation to complete (indicated by "Complete!") and then start the Data Movement gateway service:
sudo systemctl start repagent
-
Optionally confirm that the service has started:
sudo systemctl status repagent
The status should be as follows:
Active: active (running) since <timestamp> ago
The old driver will be uninstalled and the new driver will be installed.
Uninstalling the driver
Run the uninstall command if you want to uninstall the driver.
To uninstall the driver:
-
Stop all tasks configured to use this connector.
-
On the Data Movement gateway machine, change the working directory to:
opt/qlik/gateway/movement/drivers/bin
-
Run the following command:
Syntax:
./uninstall db2
The driver will be uninstalled.
Installing the driver manually
You should only attempt to install the driver manually if the automated driver installation did not complete successfully.
Linux ODBC client package
You can choose between installing the full ODBC client package or installing just the data server client, as described in Linux data server client below.
The "enableWLB" driver option is not supported. To force the connection to automatically switch to another LPAR in a parallel sysplex (i.e. “failover”), set “enableACR” to “true” and “enableWLB” to “false” in the driver configuration.
On the Data Movement gateway machine, open a shell prompt and do the following:
-
Stop the Data Movement gateway service:
sudo systemctl stop repagent
-
Optionally, confirm that the service has stopped:
sudo systemctl status repagent
The status should be as follows:
Active: inactive (dead) since <timestamp> ago
- Install v11.5.8_linuxx64_server_dec.tar.gz and choose the “CLIENT” option.
-
If the Data Movement gateway 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>
-
Change the working directory to <Data Movement gateway_Install_Dir>/bin.
-
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
-
Optionally, confirm that the driver location was copied:
cat site_arep_login.sh
-
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
-
Start the Data Movement gateway service:
sudo systemctl start repagent
-
Optionally confirm that the service has started:
sudo systemctl status repagent
The status should be as follows:
Active: active (running) since <timestamp> ago
Linux data server client
-
Download v11.5.8_linuxx64_client.tar.gz from IBM Fix Central and extract the files.
-
Stop the Data Movement gateway service:
sudo service repagent stop
-
Optionally, confirm that the service has stopped:
sudo service repagent status
The status should be as follows:
Active: inactive (dead) since <timestamp> ago
- Change the working directory to /opt/client and run db2_install.
-
Create an RSP file (see Sample RSP file below) and then run the following command (from /opt/client):
./db2setup -r /file-path/client.rsp
-
Add the following entry to the odbcinst.ini file under /etc:
[IBM DB2 ODBC DRIVER]
Driver = /opt/ibm/db2/V11.5/lib64/libdb2o.so
fileusage=1
dontdlclose=1
-
Start the Data Movement gateway service:
sudo service repagent start
-
Optionally confirm that the service has started:
sudo service repagent status
The status should be as follows:
Active: active (running) since <timestamp> ago
Sample RSP file
*----------------------------------------------------- * Generated response file used by the DB2 Setup wizard * generation time: 2/18/22 4:10 PM *----------------------------------------------------- * Product Installation LIC_AGREEMENT = ACCEPT PROD = CLIENT FILE = /opt/ibm/db2/V11.5 INSTALL_TYPE = TYPICAL * ---------------------------------------------- * Instance properties * ---------------------------------------------- INSTANCE = inst1 inst1.TYPE = client * Instance-owning user inst1.NAME = qlik inst1.UID = 1000 inst1.GROUP_NAME = qlik inst1.HOME_DIRECTORY = /home/qlik inst1.AUTOSTART = NO *----------------------------------------------- * Installed Languages *----------------------------------------------- LANG = EN
Server side ODBC setup
Bind the plan to be used for ODBC, as specified in the PLANNAME= value in the ODBC initialization file. The default name is DSNACLI. The BIND job can be found in member DSNTIJCL, which is in the SDSNSAMP library of the source DB2 installation.
Use the DB2CLI bind command to bind the ODBC-supplied packages to your intended source z/OS DB2 subsystem. This action is described in Configuring your developer and runtime environment on the IBM website. For information about the DB2CLI utility, including an example for the bind utility, see db2cli - DB2 interactive CLI command on the IBM website.
Required permissions
To enable Data Movement gateway to extract data from the source tables (Full Load and Change Data Capture), the user specified in the IBM DB2 for z/OS connector settings must be granted the following permissions:
- EXECUTE on the IFI reading the UDTF (only required for Change Data Capture)
- SELECT on the source tables and on the following system catalog tables:
- SYSIBM.SYSDUMMY1
- SYSIBM.SYSTABLES
- SYSIBM.SYSTABLESPACE
- SYSIBM.SYSPARMS
- SYSIBM.SYSROUTINES
- SYSIBM.SYSCOLUMNS
- SYSIBM.SYSLGRNX
- SYSIBM.SYSTABLEPART
- MONITOR2 to be able to start IFI sessions (only required for Change Data Capture)
Capturing data changes
To capture changes from IBM DB2 for z/OS, Data Movement gateway uses a special program - invoked as an external routine - which is a user-defined table function (UDTF). This program (a load module) as well as the UDTF need to be installed and configured on the z/OS system before changes can be captured. The installation procedure, which should be performed by the DBA, is described in Installing and configuring R4Z.
Additionally, the DATA CAPTURE CHANGES attribute must be set for every table whose changes you want to capture. You can either do this manually or allow Data Movement gateway to do this by leaving the Automatically enable DATA CAPTURE CHANGES (requires admin privilege) option enabled (the default) in the connector settings.