DB2 for z/OS replicate database configuration issues

The heterogeneous datatype support (HDS) feature of Replication Server provides a number of sample SQL scripts that help you set up the HDS feature in the replicate Replication Server and the IBM DB2 Universal Database for z/OS replicate database. These include:


hds_db2_setup_for_replicate.sql script

A script to be applied to the IBM DB2 Universal Database for z/OS replicate database.

The hds_db2_setup_for_replicate.sql script creates the RS_INFO, RS_LASTCOMMIT, and the RS_TICKET_HISTORY tables in the replicate database. The script includes GRANT statements that need to be changed before execution to reference the correct user ID name of the Maintenance User defined in the Replication Server database connection for the replicate database. The Maintenance User ID must have UPDATE authority on the tables.

NoteSybase recommends using the Maintenance User ID to execute this script.

To replicate large-object (LOB) datatypes, you must create rs_writetext and rs_get_textptr function strings. These are not included in the Replication Server HDS sample scripts.

For descriptions of the rs_writetext and rs_get_textptr function strings, see the Replication Server Reference Manual.


hds_db2_funcstrings.sql and hds_db2_udds.sql scripts

Scripts to be applied to Replication Server System Database (RSSD).

The hds_db2_udds.sql script adds the user-defined datatypes (UDDs) that define the attributes of IBM DB2 Universal Database native datatypes to the RSSD. The UDDs are required to ensure that datatypes received from primary transactions are properly formatted for application to the IBM DB2 Universal Database for z/OS replicate database.

NoteYou may need to modify the hds_db2_udds.sql script to reference the correct RSSD database name.

The hds_db2_funcstrings.sql script replaces several default Replication Server function strings with custom function strings designed to communicate with IBM DB2 Universal Database for z/OS and access the tables and procedures created by the hds_db2_setup_for_replicate.sql script. These function strings are added to the Replication Server default rs_db2_function_class.

NoteYou may need to modify the script to reference the correct RSSD database name.

If you are using a Mainframe Connect DirectConnect for z/OS Option database gateway for replication to IBM DB2 Universal Database for z/OS, you must set the following properties in the DirectConnect db2.cfg access service configuration file:

SQLTransformation=passthrough
TransactionMode=long

NoteIf you use function strings from the rs_db2_function_class in a Replication Server version prior to 12.5, do not run the hds_db2_funcstrings.sql script, as it will overwrite the function strings you are currently using.


Class-level datatype translation scripts to be applied to RSSD

Class-level translations identify primary datatypes and the replicate datatypes the data should be translated into. For example, Oracle DATE should be translated to IBM DB2 Universal Database TIMESTAMP.

NoteThese translations can affect Replication Server performance. Only the translations needed for your specific primary database and replicate database should be applied to the RSSD.

Class-level translation scripts supplied for the replicate IBM DB2 Universal Database for z/OS are: