Skip to content

Install Oracle Instant Client

A quick guide to install Oracle Instant Client. These steps do not require root permissions.

Binaries Location

Navigate to:

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

Setup on Windows

Version used in instruction: 12.2.0.1.0.

Download these archives:

  • instantclient-basic-windows.x64-12.2.0.1.0.zip
  • instantclient-sqlplus-windows.x64-12.2.0.1.0.zip
  • instantclient-tools-windows.x64-12.2.0.1.0.zip

Unzip all archives into a single directory.

Add this directory to the PATH environment variable.

Connect:

  • Using Service Name:

    sqlplus USER/PASSWORD@HOST:PORT/SERVICE_NAME
    

    Or

    sqlplus USER/PASSWORD@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=HHHHH)(PORT=NNNN)))(CONNECT_DATA=(SERVICE_NAME=SSSSS)))
    
  • Using SID:

    sqlplus USER/PASSWORD@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=HHHHH)(PORT=NNNN)))(CONNECT_DATA=(SID=SSSSS)))
    

Setup on Linux

Version used in instruction: 12.1.0.2.0.

Download these archives:

  • instantclient-basic-linux.x64-12.1.0.2.0.zip
  • instantclient-sqlplus-linux.x64-12.1.0.2.0.zip

Unpack their contents to ~/opt/ora-instantclient-12.1

Put these lines into .bash-profile:

export ORACLE_HOME=~/opt/ora-instantclient-12.1
export LD_LIBRARY_PATH="$ORACLE_HOME"
export PATH="$ORACLE_HOME:$PATH"

Create ~/opt/ora-instantclient-12.1/network/admin/tnsnames.ora with necessary databases like:

DBTEST1 =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = DBTEST1.example.com)
      (PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBTEST1.example.com)))

DBTEST2 =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = DBTEST2.example.com)
      (PORT = 1521))
    (CONNECT_DATA =
      (SID = DBTEST2.example.com)))

Relogin and try sqlplus:

$ sqlplus username@DBTEST1

SQL*Plus: Release 12.1.0.2.0 - Production on Tue Sep 22 15:19:01 2015
...