Show TOC

Configuration of Datatype Mapping for DDL ReplicationLocate this document in the navigation structure

Replication Server allows you to define mapping for the datatypes in the data definition language (DDL) commands when replicating and initializing replicate tables during materialization.

You can define the mapping through the new configuration parameter ddl_datatype_map at the replicate Replication Server.

Syntax
configure replication server set ddl_datatype_map from {ORA}.{<pdatatype> | <pdatatype(n)> | <pdatatype(precision,scale)> | } to {HDB}.{NULL | <rdatatype> | <rdatatype>[multi]| <rdatatype(n)> | <rdatatype(precision,scale)>}
Parameters
pdatatype(n)
Datatype and length of the primary datatype. When the n parameter is a negative number, the datatype with all lengths in the primary database are mapped with the same replicate datatype as indicated in the command.
pdatatype(precision,scale)
Datatype, precision and scale of the primary datatype. When the values of the precision and scale parameters are negative numbers, the datatype with all precisions and scales in the primary database are mapped with the same replicate datatype as indicated in the command. Both precision and scale must have either the same negative value or the same positive value. When you specify a primary datatype that can have precision and scale, you have to specify both precision and scale. For example: NUMBER(1) is not valid.
NULL
Configures the mapping to the default replicate datatype for this particular primary datatype.
multi
When the multi parameter is specified, the length of the replicate datatype equals the primary datatype length multiplied by the multi parameter. When the multi parameter is omitted, the primary datatype and replicate datatype have the same length.
Note
  • The multi parameter works only for datatype length, not for precision and scale.
  • The multi parameter can only be a positive integer.

For a specific DDL command, Replication Server first finds the exact match of datatype, length, precision, and scale in the datatype mapping. If this match cannot be found, Replication Server finds the match in the generic map, which is specified with negative numbers in length, precision, and scale. Otherwise, the default datatype mapping is used.

If you do not configure datatype mapping, the default mapping takes effect. Refer to Datatype Mapping Changes in the SAP Replication Server New Features Guide for details of default mapping.

Note
  • The datatype that has properties of length, precision, or scale has to be specified with explicit length, precision, and scale for the mapping.
  • The datatype mapping does not take effect in the SAP Business Suite when cluster table replication is enabled.
  • When you change Replication Server from previous versions to 15.7.1 SP204 without upgrading, you need to grant RSSD_primary_user the sa role to restart the Replication Server for the first time.
  • The datatype for the primary database in the mapping should match the datatype stored in the database system except for the datatypes listed in the following table:
    Table 1: Special Cases in DDL Datatype Mapping
    Primary Database Primary Table Datatype Primary Datatype in DDL Datatype Mapping Comments
    Oracle Integer NUMBER(38,0)  
    Binary Float Binary_Float(-2147483647)  
    Timestamp(n) Timestamp(n) The n parameter is defined in the column DATA_SCALE in the table USER_TAB_COLUMNS
    Nchar(n)/nvarchar2(n) Nchar(n)/nvarchar2(n)  

Example

Configure the replicate datatype mapping:
configure replication server set ddl_datatype_map from ORA.NUMBER(38,0) to HDB.INTEGER

Example

Configure the replicate datatype mapping:
configure replication server set ddl_datatype_map from ORA.CHAR(10) to HDB.NCHAR[]

Example

Configure the replicate datatype mapping:
configure replication server set ddl_datatype_map from ORA.CHAR(10) to HDB.NCHAR[2]

Example

Configure the replicate datatype mapping:
configure replication server set ddl_datatype_map from ORA.NUMBER(3,2) to HDB.DECIMAL(4,5)

Example

Configure the replicate datatype mapping:
configure replication server set ddl_datatype_map from ORA.CHAR(-1) to HDB.NCHAR(20)

Example

Configure the replicate datatype mapping:
configure replication server set ddl_datatype_map from ORA.NUMBER(-1, -1) to HDB.decimal