DB2 to SAP HANA Database

Lists DB2 UDB-to-SAP HANA database datatype mappings.

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

DB2 UDB Datatype

Replication Definition Datatype

SAP HANA Datatype

BIGINT

rs_udb_bigint

bigint

BLOB

rs_udb_blob

blob

CHAR

char

varchar

(See note below.)

CHAR FOR BIT DATA

rs_udb_char_for_bit (recommended)

binary

varbinary

CLOB

text

clob

DATE

rs_udb_date

date

DBCLOB

unitext

nclob

DECFLOAT(16)

rs_udb_decfloat

double

DECFLOAT(32)

rs_udb_decfloat

decimal

DECIMAL

decimal

decimal

DOUBLE

rs_udb_double

double

GRAPHIC

unichar

nvarchar

INTEGER

rs_udb_bigint

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

varbinary

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—SAP HANA database may convert single-byte extended characters into double-byte characters in char or varchar columns. This conversion may subsequently cause the storage size in SAP HANA database 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 SAP HANA database table definition. This change allows those columns to accommodate the conversion of extended characters to two-byte storage.