Datatype compatibility

Replication Agent for Oracle processes Oracle transactions and passes data to the primary Replication Server. In turn, the primary Replication Server uses the datatype formats specified in the replication definition to receive the data from Replication Agent for Oracle.

Table 3-2 describes the conversion of Oracle datatypes to Sybase datatypes.

Table 3-2: Oracle to Sybase datatype mapping

Oracle datatype

Oracle length/range

Sybase datatype

Sybase length/range

Notes

BINARY_FLOAT

5 bytes, 32-bit single precision floating point number datatype

float

4 or 8 bytes, depending on precision

  • Maximum positive finite value is 3.40282E+38F.

  • Minimum positive finite value is 1.17549E-38F.

BINARY_DOUBLE

9 bytes, 64-bit single precision floating point number datatype

double

8 bytes

  • Maximum positive finite value is 1.79769313486231E+308.

  • Minimum positive finite value is 2.22507485850720-308.

CHAR

255 bytes

char

32K

DATE

8 bytes, fixed-length, default format: DD-MON-YY

datetime

8 bytes

Replication Server supports dates from January 1, 1753 to December 31, 9999.

Oracle supports dates from January 1, 4712 BC to December 31, 4712 AD.

Default value replicated is YYYYMMDD. If pdb_convert_datetime is true, the value replicated is YYYYMMDD HH:MM:SS.sss.

TIMESTAMP(n)

21-31 bytes, variable-length, default format: DD-MON-YY hh.mm.ss.ffffff AM

datetime

8 bytes

Replication Server supports dates from January 1, 1753 to December 31, 9999.

Oracle supports dates from January 1, 4712 BC to December 31, 4712 AD.

TIMESTAMP(n) WITH [LOCAL] TIME ZONE

Variable-length, default format: DD-MON-YY hh.mm.ss.ffffff AM {+|-}hh:mm

varchar(100)

INTERVAL YEAR(n) TO MONTH

Variable-length

varchar(25)

INTERVAL DAY(n) TO SECOND(n)

Variable-length

varchar()

LONG

2GB, variable-length character data

text

LONG RAW

2GB, variable-length binary data

image

BLOB

4GB, variable-length binary large object

image

CLOB

4GB, variable-length character large object

text

NCHAR

255 bytes, multi-byte characters

unichar or char

32K

NCLOB

4GB, variable-length multibyte character large object

text

NVARCHAR2

2000 bytes, variable-length, multibyte character data

univarchar or varchar

32K

BFILE

4GB, locator points to large binary file

image

MLSLABEL

5 bytes, variable-length binary OS label

Not supported.

NUMBER (p,s)

21 bytes, variable-length numeric data

float, int, real, number, or decimal

float is 4 or 8 bytes. int is 4 bytes. real is 4 bytes. number and decimal are 2 to 17 bytes.

The float datatype can convert to scientific notation if the range is exceeded.

Integers (int) are truncated if they exceed the Replication Server range of 2,147,483,647 to -2,147,483,648 or 1x10-130 to 9.99x1025.

The number and decimal datatypes are truncated if they exceed the range of -1038 to 1038-1.

Oracle precision ranges from 1 to 38 digits. Default precision is 18 digits.

Oracle scale ranges from -84 to 127. Default scale is 0.

RAW

2000 bytes, variable-length binary data

binary or varbinary

32K

ROWID

6 bytes, binary data representing row addresses

char

32K

UDD object type

Variable length character data

User-defined Replication Server datatype

32K

See “Oracle user-defined types”.

VARCHAR2

2000 bytes, variable-length character data

varchar

32K