Skip to main content

Tips for replicating to a DB2 target.

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
David_Fergen
Former Employee
Former Employee

Tips for replicating to a DB2 target.

Last Update:

Aug 28, 2020 5:39:37 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jul 21, 2020 1:51:22 PM

Replication does not specifically list IBM DB2 (any platform) as a replication target. 

 

Resolution:

When a Replication project calls for DB2 as the target, the ODBC Endpoint should be chosen as the target type to connect to the DB2 database.

David_Fergen_0-1595353773806.jpeg

 




Once ODBC is chosen a DSN (Data Source Name) that is already configured for DB2 can be specified.   This assumes that the proper DB2 ODBC/CLI drivers have been installed and configured on the Replicate server.   Note that on a Linux server an ODBC driver manager such as unixODBC is also assumed.

 

David_Fergen_1-1595353773811.jpeg



“Advanced” settings should also be added to this endpoint definition, specifically:

  1. Set the syntax to “DB2”.
David_Fergen_2-1595353773814.jpeg


 

  1. Define an internal parameter for the desired table truncation command.  In this case the parameter we are defining is $info.query_syntax.truncate_table.  The value will depend on the DB2 target platform but in most cases will either be:
    1. DELETE FROM ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC}
    2. TRUNCATE TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC}
    3. TRUNCATE TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} IMMEDIATE

 

David_Fergen_3-1595353773817.jpeg

 

 

Cause:

With these endpoint configuration tips in mind replication to DB2 through ODBC is possible. Note: that the Qlik Replicate ODBC Target endpoint is enabled through licensing. 

Labels (1)
Version history
Last update:
‎2020-08-28 05:39 AM
Updated by: