Configuring the CDC Replication Engine for Db2 Warehouse

The procedure for configuring the CDC Replication instance for Db2 Warehouse is the same as that for configuring a CDC Replication instance for Db2 for Linux, UNIX, and Windows. This topic covers connecting to the Db2 Warehouse database to begin the configuration process.

About this task

If you are using Db2 Warehouse, you have a choice of two deployment models:

Local deployment
The CDC Replication Engine and Db2 Warehouse run inside the same Docker container.
Remote deployment
The CDC Replication Engine runs outside the Db2 Warehouse Docker container.

This procedure applies only to the remote deployment model of Db2 Warehouse, Db2 Warehouse on Cloud, and Db2 on Cloud.

Ideally, when you connect the CDC Replication Engine to Db2 Warehouse on Cloud, the CDC Replication Engine is in the same IBM Cloud Data Center as Db2 Warehouse or is colocated with Db2 Warehouse. The CDC Replication Engine connects from a local server to the remote Db2 Warehouse instance.

When you use Db2 Warehouse as a target, the performance of CDC Replication Engine partly depends on the bandwidth of the network that separates its target engine from the Db2 Warehouse instance. Physical distance also affects performance: Ideally, the CDC Replication Engine is as close as possible to the Db2 Warehouse instance. Network topology also affects performance. For example, ideally, the target CDC Replication Engine runs on a VM in the same VPN (security domain) as the target Db2 Warehouse instance. The fewer the network nodes (for example, firewalls or routers) to traverse, the better.

Mirror bulk apply

Mirror bulk apply, one of the Fast Apply modes, is preferred over other apply modes for IIAS. It provides significantly higher throughput over Fast Apply and standard JDBC apply. See External table mirror bulk apply for details on configuring this apply mode.

Procedure

Create a connection to the Db2 Warehouse database. The steps differ depending on whether you use secure socket layer (SSL):
Connection method Steps
SSL
  1. Change directories to the location where you downloaded the DigiCertGlobalRootCA.crt Db2 Warehouse SSL certificate. For example, cd /ssl_directory_name/ssl.
  2. Create a client key database and a stash file by using the GSKCapiCmd tool. For example, the following command creates a client key database called dashclient.kdb and a stash file called dashclient.sth:
    gsk8capicmd_64 -keydb -create -db "dashclient.kdb" -pw "passw0rdpw0" -stash
    The -stash option creates a stash file in the same path as that of the client key database. At connection time, GSKit uses the stash file to obtain the password to the client key database.
  3. Add the certificate to the client key database. For example, the following gsk8capicmd command imports the certificate from the /ssl_directory_name/ssl/DigiCertGlobalRootCA.crt file into the dashclient.kdb client key database:
    gsk8capicmd_64 -cert -add -db "dashclient.kdb" -pw "passw0rdpw0"
    -label "DigiCert" -file "/ssl_directory_name/ssl/DigiCertGlobalRootCA.crt"
    -format ascii -fips
  4. Update the values of the SSL_CLNT_KEYDB and SSL_CLNT_STASH database manager configuration parameters on the client to specify the client key database and the stash file. For example:
    db2 update dbm cfg using SSL_CLNT_KEYDB/ssl_directory_name/ssl/dashclient.kdb
    
    db2 update dbm cfg using SSL_CLNT_STASH/ssl_directory_name/ssl/dashclient.sth
    
  5. Catalog the Db2 Warehouse node so that client applications can connect to it. Issue the following command:
    db2 catalog tcpip node node_name remote dashDB_host_address server port security ssl
    Where:
    • node_name is your name for the Db2 Warehouse node.
    • dashDB_host_address is the fully qualified domain name (FQDN) or IP address of the Db2 Warehouse server.
    • port is the port that is used by Db2 Warehouse for incoming SSL connections (the default port number is 50001).
  6. Catalog the remote Db2 Warehouse database so that client applications can connect to it. Issue the following command:
    db2 catalog database bludb as db_alias at node node_name
    Where db_alias is your name for the Db2 Warehouse database.
  7. Test the SSL connection by issuing the following command to connect to the Db2 Warehouse database:
    db2 connect to db_alias user user_ID
    Where user_ID is your Db2 Warehouse user ID. You are prompted to enter your password.
Non-SSL
  1. Catalog the Db2 Warehouse node so that client applications can connect to it. Issue the following command:
    db2 catalog tcpip node node_name remote dashDB_host_address server port
    Where:
    • node_name is your name for the Db2 Warehouse node.
    • dashDB_host_address is the fully qualified domain name (FQDN) or IP address of the Db2 Warehouse server.
    • port is the port that is used by Db2 Warehouse for incoming non-SSL connections (the default port number is 50000).
  2. Catalog the remote Db2 Warehouse database so that client applications can connect to it. Issue the following command:
    db2 catalog database bludb as db_alias at node node_name
    Where db_alias is your name for the Db2 Warehouse database.
  3. Test the non-SSL connection by issuing the following command to connect to the Db2 Warehouse database:
    db2 connect to db_alias user user_ID
    Where user_ID is your Db2 Warehouse user ID. You are prompted to enter your password.
The procedure above is the same for Db2 Warehouse on Cloud and Db2 on Cloud.