If you are not using the unload utility and are using
automatic materialization, then Replication Server performs the
translations.
If you use the heterogeneous datatype support (HDS) feature of Replication Server to perform either column- or class-level translations on replicated data, you must perform datatype translations on the subscription data you unload from the primary database for materialization:
If any column-level translation is specified in a replication definition for the data, you must perform the datatype translation specified in each replication definition for the primary data.
If class-level translations are specified for the database connection to a replicate database (in the function-string class for the database connection), you must perform the datatype translations specified for each replicate database connection.
When Replication Server processes data for replication,
column-level translations are performed before class-level translations.
Therefore, if you must perform datatype translations on subscription
data based on both column-level translation and class-level translations,
you must perform the column-level translation first.
Datatype definitions are specified in scripts provided with Replication Server. These scripts define the attributes of the non-Sybase database native datatypes in terms of Replication Server native datatypes. You can use the datatype definitions in these scripts to determine how to translate the datatypes in the subscription data that you unload from the primary database.
Following are the scripts that support non-Sybase data servers:
hds_db2_udds.sql – DB2 Universal Database on IBM z/OS platforms
hds_udb_udds.sql – DB2 Universal Database on UNIX and Windows platforms
hds_msss_udds.sql – Microsoft SQL Server
hds_oracle_udds.sql – Oracle
Class-level translations identify primary database native datatypes and the replicate database native datatypes that data should be translated into. (For example, Oracle DATE should be translated to DB2 TIMESTAMP.)
A set of scripts is provided with Replication Server for each combination of supported primary and replicate data servers. For example, the following scripts are provided for DB2 UDB as a replicate database:
hds_clt_ase_to_db2.sql – translations for Adaptive Server datatypes to DB2 datatypes.
hds_clt_msss_to_db2.sql – translations for Microsoft SQL Server datatypes to DB2 datatypes.
hds_clt_oracle_to_db2.sql – translations for Oracle datatypes to DB2 datatypes.
You can use the datatype translations specified in these scripts to determine how to translate the datatypes in the subscription data that you unload from the primary database.
Datatype translations based on class-level translation
scripts must be performed after column-level
translations.
For more information about Replication Server HDS datatype translations, see “Replication Server heterogeneous datatype support”.