DB2 to HANA DB

Lists DB2 UDB-to-HANA DB datatype mappings.

See SAP HANA Reference > SQL Reference Manual > Data Types for current information on the range of values that can be represented by HANA DB datatypes.
DB2 UDB-to-HANA DB Datatype Mappings

DB2 UDB Datatype

Replication Definition Datatype

HANA Datatype

BIGINT

rs_udb_bigint

bigint

BLOB

image

blob

CHAR

char

char

(See note below.)

CHAR FOR BIT DATA

rs_udb_char_for_bit (up to 255 bytes)

varbinary (greater than 255 bytes)

varbinary

CLOB

text

clob

DATE

rs_udb_date

date

DBCLOB

unitext

nclob

DECFLOAT(16)

rs_udb_decfloat

float

DECFLOAT(32)

rs_udb_decfloat

decimal

DECIMAL

decimal

decimal

DOUBLE

rs_udb_double

double

GRAPHIC

unichar

nchar

INTEGER

integer

integer

LONG VARCHAR

text

clob

LONG VARCHAR FOR BIT DATA

image

blob

LONG VARGRAPHIC

unitext

nclob

REAL

rs_udb_real

real

SMALLINT

smallint

smallint

TIME

rs_udb_time

time

TIMESTAMP(12)

rs_udb_timestamp12

timestamp

VARCHAR

varchar

varchar

(See note below.)

VARCHAR FOR BIT DATA

rs_udb_varchar_for_bit (up to 255 bytes)

varbinary (greater than 255 bytes)

varbinary

VARGRAPHIC

univarchar

nvarchar

Note: If your primary database is configured for a single-byte character set (like iso_1) that accepts extended ASCII characters—the one-byte ASCII character values between 128 and 255—HANA DB may convert single-byte extended characters into double-byte characters in char or varchar columns. This conversion may subsequently cause the storage size in HANA DB to exceed the original column length or storage of the primary database. If your primary database and application support using extended ASCII characters in a single-byte character set, you may need to increase the size of the corresponding column in the HANA DB table definition. This change allows those columns to accommodate the conversion of extended characters to two-byte storage.