How datatype definitions work

Datatype definitions allow you to translate from one datatype to another without losing valuable information.

When used as the declared datatype, a datatype definition provides the mechanism for capturing both the literal value and its datatype attributes—such as delimiters, range information, precision, scale, length, and maximum and minimum values—and translating them into a native datatype format that Replication Server can process.

When used as a published datatype, a datatype definition takes the value in Replication Server native datatype format, including its attribute information, and translates that information into a datatype format acceptable to another database, retaining as much information as the published datatype can accommodate.

When data definitions are used for both the declared and published datatypes, both translations take place.

The following tables list the available datatype definitions for each supported non-Sybase datatype.

NoteMicrosoft SQL Server does not directly support the new unsigned integer types in 15.0 and requires to use a map to clause in their replication definitions.

Table 9-4 lists the supported DB2 datatypes and their datatype definition equivalents.

Table 9-4: Datatype definitions for DB2 datatypes

DB2 datatype

Datatype definition

CHAR FOR BIT DATA

rs_db2_char_for_bit

DATE

rs_db2_date

TIME

rs_db2_time

TIMESTAMP

rs_db2_timestamp

VARCHAR FOR BIT DATA

rs_db2_varchar_for_bit

TINYINT

rs_db2_tinyint

DECIMAL

rs_db2_decimal

NUMERIC

rs_db2_numeric

Table 9-5 lists supported Oracle datatypes and their datatype definition equivalent.

Table 9-5: Datatype definitions for Oracle datatypes

Oracle datatype

Datatype definition

RAW

rs_oracle_binary

DATE

rs_oracle_date

DATE (with time)

rs_oracle_datetime

NUMBER (INTEGER)

rs_oracle_int

NUMBER (FLOAT)

rs_oracle_float

NUMBER (DECIMAL)

rs_oracle_decimal