Monday, June 24, 2013

Oracle Database Instant Client Installation

Oracle Database Instant Client Installation

The Oracle Instant Client software is an easy to use alternative to a full blown Oracle Client installation. Especially if you are mainly interested in the Oracle sqlplus tool.

1. Create an oracle account (if not already available)

# groupadd oracle
# useradd -c "Oracle Instant Client" -d /home/oracle \
          -g oracle -m -s /bin/bash oracle
# password oracle


2. Login as user oracle and unpack the Oracle Instant Client software:

$ unzip instantclient-basiclite-linux.x64-11.2.0.3.0.zip
$ unzip  instantclient-sqlplus-linux.x64-11.2.0.3.0.zip


3. Set the Oracle Instant Client environment

ORACLE_BASE=/home/oracle                    ; export ORACLE_BASE
ORACLE_HOSTNAME=`uname -n`                  ; export ORACLE_HOSTNAME
ORACLE_HOME=$ORACLE_BASE/instantclient_11_2 ; export ORACLE_HOME
ORACLE_SID=dbsecdocs                        ; export ORACLE_SID
TWO_TASK=$ORACLE_SID                        ; export TWO_TASK
TNS_ADMIN=$ORACLE_HOME                      ; export TNS_ADMIN
#
PATH=$ORACLE_HOME:$PATH                       ; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH