Oracle® ODBC Driver Unix Getting Started Guide

This guide shows you how to download, install and license the Oracle® ODBC driver.

At the end, you will be able to access your Oracle® databases (version 8.1.7 or above) from Unix systems using isql, an interactive SQL tool installed with unixODBC, the open source Driver Manager that is included in the ODBC driver distribution.

The process will take approximately 10–15 minutes, excluding software download time.

If you are installing in order to evaluate the ODBC driver, the process will allow you to obtain a free trial license.

Assumptions

Before You Begin

What You Need to Know

Obtain this information from your Oracle® Database Administrator:

Pre-requisites

Easysoft provide two variants of the Oracle® ODBC driver: an OCI driver and a Wire Protocol (WP) driver. The OCI driver uses Oracle® client software to access Oracle®. If you are using the OCI driver, refer to the following section for information about obtaining, installing and testing this pre-requisite software. The WP driver does not use Oracle® client software. If you are using the WP driver, skip the client software section and follow the instructions in Downloading, Installing and Testing the ODBC Driver.

Oracle® Client Software

Although the OCI driver is compatible with both the standard Oracle® Client and the Instant Client, this guide describes how to use the driver with the Instant Client. This is because the Instant Client:

If you want to use the standard Oracle® Client (for example, you will be installing the ODBC driver on a machine where the Oracle® Client is already installed), you can still follow the instructions in this guide. The process is the same for both versions of the client, unless noted otherwise in Notes on the Standard Oracle® Client.

Install and test the Oracle® Instant Client

  1. Visit the Oracle® web site and login. If you have not yet done so, you need to register first.

    You need to be a registered Oracle® user to download the Instant Client.

  2. Choose the Instant Client for your client platform at:

    http://www.oracle.com/technetwork/database/features/instant-client/index.html

  3. Download the Basic and SQL*Plus Instant Client Packages.

    These packages contain the Instant Client and a version of SQL*Plus that is compatible with the Instant Client. SQL*Plus lets you test that you can access Oracle® with the Instant Client.

    Notes

    • On Linux, the Instant Client 10.2 requires a minimum of glibc 2.3.3. To check the glibc version, on the Linux system, look at the first line of the output produced by running /lib/libc.so.6 (on some platforms, libc.so.6 is located in /usr/lib):
      /lib/libc.so.6
      GNU C Library stable release version 2.3.2, by Roland McGrath et al.
      

      If you do not have the required glibc version, you need to download the Instant Client 10.1 packages. The Instant Client 10.1 is compatible with earlier versions of glibc.

    • On Linux, the Instant Client 11.1 requires glibc 2.3.3 or later and the libaio package (version 0.3 or later).
  4. On the machine from which you want to access Oracle®, extract the Instant Client and SQL*Plus files. For example:
    cd /tmp
    unzip instantclient-basic-linux32-10.2.0.2-20060331.zip -d /usr/lib
    unzip instantclient-sqlplus-linux32-10.2.0.2-20060331.zip -d /usr/lib
    
  5. Add the Instant Client directory path to the LD_LIBRARY_PATH environment variable and export LD_LIBRARY_PATH. For example:
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/instantclient_10_2
    export LD_LIBRARY_PATH
    

    Replace /usr/lib with the directory where you extracted the Instant Client. For the Instant Client 10.1, replace instantclient_10_2 with instantclient10_1.

    Note On AIX, replace LD_LIBRARY_PATH with LIBPATH.

  6. Use SQL*Plus to test that you can access Oracle®. For example:
    cd /usr/lib/instantclient_10_2
    ./sqlplus username/password@//machine_name:port/database_name
    

    where:

    • username and password are the database username and password.
    • machine_name is the host name or IP address of the Oracle® database server.
    • port is the Oracle® listener port.
    • database_name is the service name associated with the database you want to access.

    Note If you are unable to connect to Oracle® with SQL*Plus, contact your Oracle® Database Administrator. If you cannot access your Oracle® database with SQL*Plus, you will not be able to access the database with the OCI driver.

  7. At the prompt, type a SELECT statement to test that you can retrieve some data:
    select * from dual;
    

    To exit SQL*Plus, type exit.

Downloading, Installing and Testing the ODBC Driver

The process has four steps:

  1. Login.
  2. Download the ODBC driver software.
  3. Install and configure the ODBC driver.
  4. Access your data sources.

Step 1. Login

Step 2. Download the ODBC driver software

  1. Download the ODBC driver.
  2. In the Download page, select the platform you require and click Download.
  3. Follow your browser instructions to save the distribution file to a temporary directory on the target machine.

Step 3. Install and configure the ODBC driver

  1. Login to your Unix system and change to the directory where you have saved the distribution.
  2. Untar the distribution file using the following command, substituting the version number and platform from your distribution filename. For example:
    tar -xvf odbc-oracle-version-platform.tar
    
  3. cd into the directory created by unpacking the distribution file. For example:
    cd odbc-oracle-version-platform
    
  4. As root, type ./install to start the install. After you have accepted the License Agreement, accept the defaults throughout the installation.
  5. When prompted to choose a product to license, choose the ODBC driver by typing its option number. For example:
    [0] Exit
    [1] View existing licenses
    [2] Oracle ODBC Driver V3.3
    
    Please choose the product you would like a license for by entering its
    item number or enter one of the other options.
    
    Option: 2
    

    Next, you need to supply:

    1. Your full name
    2. Your company name
    3. An email contact address. This must be the email address you registered on the Easysoft web site.
    4. Your telephone number (you need to specify this if you telephone the license request to us).
    5. Your fax number (you need to specify this if you fax the license request to us).
    6. A reference number. When applying for a trial license just press <Enter> on this field as this field is used to enter a reference number we will supply you for full (paid) licenses.

    You will then be asked for a method of obtaining the license. To obtain a license automatically, you will need to be connected to the Internet and allow outgoing connections to license.easysoft.com on port 8884. If you are not connected to the Internet or do not allow outgoing connections on port 8884, the License Client can create a license request file which you can:

    1. Enter at http://www.easysoft.com/support/licensing/trial_license.html to obtain your license.
    2. Mail, fax or telephone to Easysoft.

    If you choose option [2] the license request is written to the file license_request.txt and you should exit the License Client via option [0] and complete the installation. Once you have mailed, faxed or telephoned the license request to us, we will return a license key, which you should add to the end of the file /usr/local/easysoft/license/licenses.

  6. When prompted to create the sample data source, enter:
    • The host name or IP address of the Oracle® database server.
    • The service name that identifies the database you want to connect to.
    • The Oracle® listener port.
    • The Oracle® database username and password.

    At the end of the installation, you will have installed and licensed the ODBC driver, installed the unixODBC Driver Manager and created an ODBC data source.

  7. Set and export the LD_LIBRARY_PATH environment variable:
    EASYSOFT=/usr/local/easysoft
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EASYSOFT/lib
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EASYSOFT/unixODBC/lib
    export LD_LIBRARY_PATH
    

    Note On AIX, replace LD_LIBRARY_PATH with LIBPATH.

  8. If you are using the OCI version of the ODBC driver, set LD_LIBRARY_PATH to include the driver directory and the Instant Client directory. For example:
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EASYSOFT/oracle
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/instantclient_10_2
    export LD_LIBRARY_PATH
    

Step 4. Access your data sources

What Next?

Further Support

Notes on the Standard Oracle® Client

Refer to this section if you want to use the OCI version of the ODBC driver with the standard Oracle® client.

Getting Started Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)


Oracle is a registered trademark of Oracle Corporation and/or its affiliates.