Load data from Oracle
This article explains how to connect to an Oracle database with Exasol and load data.
To know more about data type mappings and how to migrate data, see the Oracle to Exasol migration script in our GitHub repository.
We recommend using Oracle Call Interface over Oracle JDBC to connect to Exasol. This article describes both methods.
Prerequisites
-
The Oracle system must be reachable from the Exasol system
-
The user credentials in the connection must be valid.
Oracle Call Interface
Download Oracle Instant Client
Download Oracle Instant Client 12.1.0.2.0 from the Oracle website to your local machine.
Oracle Instant Client 12.1.0.2.0 is the only version supported in Exasol 7.1.
Configure the client in EXAoperation
Create and test connection
To create a connection, run the following statement. Replace the connection string and credentials as needed.
CREATE OR REPLACE CONNECTION OCI_ORACLE
TO '192.168.99.103:1521/xe'
USER 'system'
IDENTIFIED BY 'oracle';
Alternatively, run the following statement:
CREATE CONNECTION OCI_ORACLE TO '(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.99.103)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = orcl)))';
To test the connection, run the following statement:
Oracle JDBC
Download JDBC driver
Download the compatible driver from the Oracle JDBC Driver Download Page link.
Configure the driver in EXAoperation
Do the following to configure the driver in EXAoperation:
- Log in to EXAoperation user interface as an Administrator user.
- Select Configuration > Software and click the JDBC Drivers tab.
- Click Add to add the JDBC driver details
- Enter the following details for the JDBC properties:
- Driver Name:
ORACLE
- Main Class:
oracle.jdbc.OracleDriver
- Prefix:
jdbc:oracle:thin:
- Disable Security Manager: Leave this option unchecked.
- Comment: This is an optional field.
- Driver Name:
- Click Add button to save the details.
- Select the radio button next to the driver from list of JDBC driver.
- Click Choose File to locate the downloaded driver and click Upload to upload the JDBC driver.
For more information about how to manage the JDBC driver through EXAoperation, see Manage JDBC Drivers.
Create and test connection
To create a connection, run the following statement. Replace the connection string and credentials as needed.
CREATE CONNECTION JDBC_ORACLE
TO 'jdbc:oracle:thin:@//10.78.0.178:1521/orcl'
USER 'exatest'
IDENTIFIED BY 'test';
To test the connection, run the following statement:
Load data
Use IMPORT to load data from a table or SQL statement using the connection that you created.