Importing data from an Oracle database
You can import data from an Oracle Database. The setup process is the same as importing from a DB2® database over a JDBC connection.
- Define a DataSource in the WebSphere® Application Server administrative console.
- Use that DataSource definition to define and register the data import system reference.
- Use the standard mapping file syntax to import the data.
Data type mappings for Oracle
The following
table lists the data type mapping for Oracle data types to DB2 data types.
| Oracle data type | DB2 data type |
|---|---|
| varchar2 | varchar |
| nvarchar2 | varchar |
| nchar | varchar |
| timestamp(6) | timestamp |
| timestamp(6) with local time zone | timestamp |
| timestamp(6) with time zone | timestamp |
| binary_float | real |
| binary_double | real |
| number | real |
The data type mappings can be extended by using the CF.DI.TypeOverrides system
property. Use the following format for the property value:
"remoteType1=db2Type1;remoteType2=db2Type2;..."
For example, the following SQL adds support for two
external types (typeA and typeB),
both mapped to the DB2 type
of BIGINT:
INSERT INTO CFCONFIG.SYSTEM_PROPS (STEREOTYPE, VALUE) VALUES ('CF.DI.TypeOverrides', 'typeA=BIGINT;typeB=BIGINT');