Loading Data from Oracle

This section describes how you can connect Oracle database with Exasol and load data.

Exasol recommends using Oracle OCI (Oracle Call Interface) instead of Oracle JDBC.

To view the Oracle to Exasol migration script, refer to the GitHub repository.

Oracle OCI

Download Driver

Download the Oracle instant client version compatible with your Exasol version from the Oracle Instant Client Download page.

To know the compatible version of Oracle instant client, open EXAoperation, and select Software. Under the Versions, you can see the exact instant client version number. For example, as shown in the below image, the version of the instant client required is instantclient-basic-linux.x64-12.1.0.2.0

Instant Client Version

Configure the Client in EXAoperation

Do the following to configure the driver in EXAoperation:

  1. Log in to EXAoperation user interface as an Administrator user.
  2. Select Configuration > Software > Versions tab.
  3. Locate the downloaded Oracle client and click Submit to upload the driver.

    Connect Oracle OCI to Exasol

Run Statements

Run the following statements from an SQL client to check the connection.

The Oracle system must be connected to the Exasol database and the user should exist in the system before running the SQL statements.

CREATE CONNECTION

Run the following statement to create a connection.

CREATE OR REPLACE CONNECTION OCI_ORACLE
    TO '192.168.99.103:1521/xe'
    USER 'system'
    IDENTIFIED BY 'oracle';

Alternatively, you can 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)))';

Test Connection

select * from 
(
import from ORA at OCI_ORACLE
statement 'select ''Connection works'' from dual'
);

Oracle JDBC

Download 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:

  1. Log in to EXAoperation user interface as an Administrator user.
  2. Select Configuration > Software and click the JDBC Drivers tab.
  3. Click Add to add the JDBC driver details
  4. Enter the following details for the JDBC properties:
    • Driver Name: ORACLE
    • Main Class: oracle.jdbc.OracleDriver
    • Prefix: jdbc:oracle:thin:
    • Comment: This is an optional field.
  5. Click Add button to save the details.
  6. Select the radio button next to the driver from list of JDBC driver.
  7. 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.

Run Statements

Run the following statements from an SQL client to check the connection.

The Oracle system must be connected to the Exasol database and the user should exist in the system before running the SQL statements.

CREATE CONNECTION

CREATE CONNECTION JDBC_ORACLE
TO 'jdbc:oracle:thin:@//10.78.0.178:1521/orcl'
user 'exatest'
identified by 'test';

Test Connection

Test the connectivity by querying the Oracle system catalog.

select * from 
(
import from jdbc at JDBC_ORACLE
statement 'select ''Connection works'' from dual'
);

Load Data

You can use the IMPORT statement to load data using the connection you created above. IMPORT supports loading data from a table or a SQL statement.