8.144 Installing the Oracle Instant Client

To install the Oracle Instant Client

  1. Go to the "Install Client Downloads" page on the Oracle website. Choose the link that matches your system type (for instance, Instant Client for Linux x86-64). Choose Accept License Agreement at the top of the page and download the following RPM or zip files for your target version (such as 11.2):
  2. The process of connecting Oracle to Moab Workload Manager has been tested on Oracle Instant Client version 11.2. The process may work with other versions, but they are not supported.

    • Basic (oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm)
    • SQL Plus (oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm)
    • ODBC (oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64.rpm)
  3. Install the packages. This example installs the RPMs.
    [root]# rpm -i ./oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
    [root]# rpm -i ./oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
    [root]# rpm -i ./oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64.rpm
  4. Create a configuration file in /etc/ld.so.conf.d to add the Oracle client libraries to the LD_LIBRARY_PATH.
  5. To confirm where the RPMs installed the libraries, run rpm -qlp <rpmFileName>.

    [root]# cat >/etc/ld.so.conf.d/oracle-instant-client.conf <<EOL
    /usr/lib/oracle/11.2/client64/lib
    EOL

    If you installed Oracle Instant Client from a repository, run repoquery -ql <rpmName> instead.

    Rebuild the LD_LIBRARY_PATH.

    [root]# ldconfig
  6. Connect to the database using sqlplus. If you used RPMs to install the client, the 32-bit and 64-bit clients are already in your PATH.
    [root]# sqlplus64 moab/moab@adaptive-oracle:1561/MOAB
     
    SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 30 14:35:10 2013
     
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
     
    Connected to:
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production

    The 64-bit sqlplus client was used to connect to a 64-bit 11g instance called MOAB, which is hosted on adaptive-oracle.ac.

  7. Verify that you are logged in to the correct database.
    SQL> select name from v$database
      2  ;
    NAME
    ---------
    MOAB
  8. Create the database in Oracle using the moab-db-oracle-create.sh script located in the contrib/sql directory.

    This contrib/sql directory is either in the $MOABHOMEDIR (if you used RPM method) or in the expanded tarball directory (if you used Manual method).

    Useful comments are at the top of the script. Read the comments before running the script.

    [root]# ./moab-db-oracle-create.sh
  9. Display all of user MOAB's tables.
    SQL> select table_name from all_tables where owner = 'MOAB';
     
    TABLE_NAME
    ------------------------------
    TRIGGERS
    MOAB
    OBJECTTYPE
    VCS
    EVENTTYPE
    JOBHISTORY
    MCHECKPOINT
    NODES
    EVENTS
    NODESTATSGENERICRESOURCES
    JOBS
    RESERVATIONS
    GENERICMETRICS
    REQUESTS
    GENERALSTATS
    NODESTATS
     
    16 rows selected.
    SQL>
  10. Generate a script to describe all of user MOAB's tables. Cut and paste the following into a terminal that is not logged in to SQLPlus.
    [root]# cat > /tmp/generateDescribe.sql <<EOL
    SET HEADING OFF
    SET FEEDBACK OFF
    SET ECHO OFF
    SET PAGESIZE 0
    SPOOL /tmp/describeAllUserTables.sql
    select 'desc '||owner||'.'||table_name||';' from all_tables where owner = 'MOAB';
    SPOOL OFF
    EOL
  11. Run describeAllUserTables.sql.
    [root]# SQL> start /tmp/describeAllUserTables.sql

Related Topics 

© 2016 Adaptive Computing