Replication Agent for UDB processes transactions and passes data to the primary Replication Server.
The primary Replication Server uses the datatype formats specified in the replication definition to receive the data from Replication Agent for UDB.
The following table describes the default conversion of DB2 Universal Database datatypes to Sybase datatypes.
DB2 UDB datatype |
DB2 UDB length/range |
Sybase datatype |
Sybase length/range |
Notes |
---|---|---|---|---|
BIGINT |
-9,223,372,036, 854,775,808 to 9,223,372,036, 854,775,807. |
decimal |
10-38 to 1038, 38 significant digits. |
|
BLOB |
variable length, 2GB, binary data |
image |
2GB |
|
CHAR |
254 bytes |
char |
32K |
|
CHAR FOR BIT DATA |
254 bytes, binary data |
binary |
32K |
|
CLOB |
variable length, 2GB, character data |
text |
2GB |
|
DATE |
0001-01-01 to 9999-12-31 |
char or datetime |
32K (char) |
If the pdb_convert_datetime parameter is false, DATE values are sent as char datatype strings. If the pdb_convert_datetime parameter is true, DATE values are converted to datetime values. |
DBCLOB |
variable length, 2GB, double-byte character data |
text |
2GB |
|
DECIMAL |
-1031+1 to 1031-1, 31 digits of precision |
decimal |
10-38 to 1038, 38 significant digits. |
|
DOUBLE |
See FLOAT. |
|||
FLOAT |
8 bytes, -1.79769308 to 1.79769308 |
float |
The float precision and range corresponds to a C double datatype, approximately 16 significant digits. |
Extremely small values are truncated to 16 digits to the right of the decimal. Extremely large values retain their precision. |
GRAPHIC |
127 characters, double-byte character data |
unichar or char |
32K |
To use the unichar datatype, the use_rssd parameter must be true and the replication definition must specify a Unicode datatype. |
INTEGER |
-2,147,483,648 to 2,147,483,647 |
int |
-2,147,483,648 to 2,147,483,647. |
|
LONG VARCHAR |
variable length, 32,700 bytes, character data |
varchar |
32K |
|
LONG VARCHAR FOR BIT DATA |
32,700 bytes, binary data |
varbinary |
32K |
|
LONG VARGRAPHIC |
16,350 characters, double-byte character data |
univarchar or varchar |
32K |
To use the univarchar datatype, the use_rssd parameter must be true and the replication definition must specify a Unicode datatype. |
NUMERIC (synonym for DECIMAL) |
See DECIMAL. |
|||
REAL |
-3.40238 to 3.40238 |
decimal |
10-38 to 1038, 38 significant digits. |
|
SMALLINT |
-32,768 to 32,767 |
smallint |
-32,768 to 32,767 |
|
TIME |
00:00:00 to 24:00:00 |
char or datetime |
32K (char) |
|
TIMESTAMP |
0001-01-01-00.00.00.000000 to 9999-12-31-24.00.00.000000 |
char or datetime |
32K (char) |
If the pdb_convert_datetime parameter is false, TIMESTAMP values are sent as char datatype strings. If the pdb_convert_datetime parameter is true, TIMESTAMP values are converted to datetime values. |
VARCHAR |
32,672 bytes |
varchar |
32K |
|
VARCHAR FOR BIT DATA |
32,672 bytes, binary data |
varbinary |
32K |
|
VARGRAPHIC |
16,336 characters, double-byte character data |
univarchar or varchar |
32K |
To use the univarchar datatype, the use_rssd parameter must be true and the replication definition must specify a Unicode datatype. |
For each datatype in Table A-2, lengths in the second column are described as:
Character datatypes – maximum number of bytes
Graphic datatypes – maximum number of characters
Numeric datatypes – range from smallest to largest values
Temporal datatypes – range from earliest time to latest time