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 Microsoft SQL Server replicate database.
A script to be applied to the Microsoft SQL Server replicate database.
The hds_msss_setup_for_replicate.sql script creates the RS_INFO, RS_LASTCOMMIT, and 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.
Scripts to be applied to Replication Server System Database (RSSD).
The hds_msss_udds.sql script adds the user-defined datatypes (UDDs) that define the attributes of Microsoft SQL Server native datatypes to the RSSD. The UDDs are required to ensure datatypes received from primary transactions are properly formatted for application to the Microsoft SQL Server replicate database.
You might need to modify the hds_msss_udds.sql script
to reference the correct RSSD database name.
The hds_msss_funcstrings.sql script replaces several default Replication Server function strings with custom function strings designed to communicate with Microsoft SQL Server and access the tables and procedures created by the hds_msss_setup_for_replicate.sql script. These function strings are added to the Replication Server default rs_msss_function_class.
You might need to modify the script to reference the
correct RSSD database name.
Class-level translations identify primary datatypes and the replicate datatypes the data should be translated into (for example, IBM DB2 Universal Database TIMESTAMP should be translated to Microsoft SQL Server datetime).
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 Microsoft SQL Server replicate database are:
hds_clt_db2_to_msss.sql – translates IBM DB2 Universal Database for IBM z/OS datatypes to Microsoft SQL Server datatypes.
hds_clt_udb_to_msss.sql – translates IBM DB2 Universal Database (for UNIX and Windows) datatypes to Microsoft SQL Server datatypes.
hds_clt_oracle_to_msss.sql – translates Oracle datatypes to Microsoft SQL Server datatypes.
Class-level translations are not supplied for Adaptive
Server datatypes to Microsoft SQL Server datatypes (or Microsoft
SQL Server datatypes to Adaptive Server datatypes) because Microsoft
SQL Server datatypes are directly compatible with Adaptive Server
datatypes and they require no translation.
A script to be applied to the replicate Replication Server.
The hds_msss_connection_sample.sql script provides a template for creating the Replication Server database connection for a Microsoft SQL Server replicate database using the pre-defined Microsoft SQL Server function-string class provided with Replication Server.
You must modify the hds_msss_connection_sample.sql template
to include your actual server, database, and Maintenance User names
before executing the script.