Replicating non-Sybase data requires unique function strings, datatype definitions, and translations to translate data from one datatype to another.
For more detailed information, refer to “Replication Server heterogeneous datatype support” and “Emulating rs_init activity for a non-Sybase database”.
Replication Server stores function strings, datatype definitions, and translations in the RSSD. These objects are loaded in the RSSD using scripts provided by Sybase. The scripts are located in $SYBASE/$SYBASE_RS/scripts and are named using the following conventions:
Function-string class scripts – hds_xxx_funcstrings.sql
Example: hds_db2_funcstrings.sql
UDD (datatype definition) class scripts – hds_xxx_udds.sql
Example: hds_db2_udds.sql
Translation scripts – hds_clt_xxx_to_xxx.sql
Example: hds_clt_db2_to_oracle.sql
Each non-Sybase data server has a function-string class and a UDD class that contains function strings and UDDs that are used to translate the data into its native format. Additionally, each translation that defines how a non-Sybase datatype is translated to another non-Sybase datatype is associated with a function-string class.
All of these objects—function strings, UDDs, and translations—must be loaded in the RSSD of the correct Replication Server to produce the correct datatype transformations.
The following list describes issues that affect where these objects should be loaded:
Replicate Replication Servers require:
The function-string class (and all associated function strings) for all replicate data servers that it manages.
The UDD class (and all associated UDDs) for all replicate data servers that it manages, and for all primary data servers that replicate data to the replicate data servers that it manages. The primary data UDDs are required for the translations.
Translations for all primary/replicate data server pairs. For example, for replication between Oracle and DB2, the Oracle to DB2 translations are required.
Primary Replication Servers require:
The function-string class for a bidirectional connection to a primary data server
The function-string class and the UDD class to perform materialization.
The UDD class for all primary data servers that it manages so that replication definitions can use UDDs in declared datatypes.
The UDD class for all replicate data servers, if replication definitions use UDDs in published datatypes.
To set up Replication Server to translate data
for a non-Sybase database
Modify each script to issue a use db command before any other commands, where db is the database name of the RSSD for the Replication Server.
Make a copy of the script if it is needed in more than one RSSD. For example, add the following lines to the beginning of the scripts:
use emb go
Load the function-string class scripts first. From the command prompt enter:
isql -Uuid -Ppassword -SRSSD < hds_dbtype_funcstrings.sql
Load the UDD class scripts next. From the command prompt enter:
isql -Uuid -Ppassword -SRSSD < hds_dbtype_udds.sql
Load the translation scripts last. From the command prompt enter:
isql -Uuid -Ppassword -SRSSD < hds_dbtype_to_dbtype.sql
Shut down and restart the Replication Server.
This last step is required. Modifying the RSSD does
not refresh the Replication Server memory cache.