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:
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.
Sybase 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.
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.
You 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.
You 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
If 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 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.
These 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:
hds_clt_ase_to_db2.sql – translates Adaptive Server datatypes to IBM DB2 Universal Database datatypes.
hds_clt_udb_to_db2.sql – translates IBM DB2 Universal Database (for UNIX and Windows) datatypes to IBM DB2 Universal Database for IBM z/OS datatypes.
hds_clt_msss_to_db2.sql – translates Microsoft SQL Server datatypes to DB2 datatypes.
hds_clt_oracle_to_db2.sql – translates Oracle datatypes to IBM DB2 Universal Database datatypes.
hds_db2_connection_sample.sql – a script to be applied to create a connection to the DB2 database. (The connection may be to ECDA.)
The hds_db2_connection_sample.sql script provides a template for creating the Replication Server database connection for a replicate IBM DB2 Universal Database for z/OS using the pre-defined IBM DB2 Universal Database function-string class provided with Replication Server.
You must modify the hds_db2_connection_sample.sql template
to include your actual server, database, and Maintenance User names
before executing the script.