Oracle to SAP HANA Database

Lists Oracle-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.
Note: Do not use a column with the Oracle RAW or LONG RAW datatype as a primary key or as part of a primary key.
Oracle-to-SAP HANA Database Datatype Mappings

Oracle Datatype

Replication Definition Datatype

SAP HANA Database Datatype

ANYDATA

opaque

No default

BFILE

image

blob

BINARY_DOUBLE

rs_oracle_decimal

double

BINARY_FLOAT

rs_oracle_float

real

BLOB

image

blob

CHAR

char

varchar

(See note below.)

CLOB

text

unitext (multibyte)

clob

nclob (multibyte)

DATE

rs_oracle_datetime

timestamp

FLOAT

rs_oracle_float

float

INTEGER

rs_oracle_decimal

decimal (to 34 digits)

varchar (over 34 digits)

INTERVAL

rs_oracle_interval

No default

LONG

text

clob

LONG RAW

image

blob

NCHAR

unichar

nvarchar

NCLOB

unitext

nclob

NESTEDTAB

opaque

No default

NUMBER

rs_oracle_decimal

double
Note: When Oracle NUMBER is specified without precision, the maximum value allowed by the Oracle column exceeds SAP HANA database decimal. SAP HANA database double is the only SAP HANA database datatype supporting any possible Oracle value. When the NUMBER precision is known or specified, use SAP HANA database decimal.

NUMBER(1)

rs_oracle_decimal

tinyint

NUMBER(2)

NUMBER(4)

rs_oracle_decimal

smallint

NUMBER(5)

NUMBER(9)

rs_oracle_decimal

integer

NUMBER(10)

NUMBER(18)

rs_oracle_decimal

bigint

NUMBER(p,s)

rs_oracle_decimal

varchar

decimal (to 34 digits)

varchar (over 34 digits)

NVARCHAR

univarchar

nvarchar

NVARCHAR2

univarchar

nvarchar

Object types

opaque

No default

RAW

rs_oracle_binary

varbinary

REF

rs_oracle_binary

No default

ROWID

rs_oracle_rowid

varchar(20)

TIMESTAMP(n)

rs_oracle_timestamp9

timestamp

TIMESTAMP WITH LOCAL TIME ZONE

rs_oracle_timestamp9

No default

To replicate TIMESTAMP WITH TIME ZONE Oracle datatype into SAP HANA database, you must explicitly create a table replication definition with map to char clause.

TIMESTAMP WITH TIME ZONE

rs_oracle_timestamptz

No default

VARCHAR2

varchar

varchar

(See note below.)

VARRAY

opaque

No default

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.

Fixed-Length Column Mapping

SAP HANA database does not pad fixed-length CHAR column values specified in a subscription where clause, and this can result in a data mismatch. For example, if the character string 'abc' is passed in a fixed-length column defined in a subscription where clause as char(5), SAP HANA database does not pad the remaining characters with whitespace as 'abc  ', and a mismatch occurs. You should therefore map fixed-length CHAR columns to the SAP HANA database varchar datatype.