Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum Rss Feed

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted Jun 29, 2004

Instant Client in Oracle 10g - Page 2

By James Koopmann

How to Install Instant Client for SQL*Plus

The installation procedures are the simplest I have ever come across for an Oracle product. Granted, I did have to search for a few different installation procedures for the Instant Client until I actually got all of the steps down. This was a bit frustrating but still did not take all that much time and I was able to find everything through the technet.oracle.com website. Remember this is only for SQL*Plus and if you want to connect by any of the different supported connection types you may need a few more steps. In addition, it is VERY MUCH RECOMMENDED you DO NOT install these files into an $ORACLE_HOME directory. I would try it but honestly did not want to spend a couple of hours backing out what I did and re-installing my full-blown Oracle Client installation.

1. Download the Basic and SQL*Plus Instant Client packages. You also might want to go ahead and download all of the other packages and keep them together as a single version of this product. Even if you do not have a need for one of the additional support libraries, they do not take but a minute and could come in handy if versions become an issue.

Contents of the Basic Package

Contents of the SQL*Plus Package

2. Unzip the packages that you will be using into a newly created directory of your choice. When I did this, I wanted a truly portable installation and ended up putting this on my USB Flash Drive. Therefore, my directory was E:\OracleInstantClient.

Contents of My Instant Client Directory

3. Set environment variables such that the following are maintained.

  1. SET PATH=E:\OracleInstantClient;%PATH%

    • This is obviously for finding the executables.

  2. SET TNS_ADMIN=E:\OracleInstantClient

    • This is only for finding the tnsnames.ora file. You do not have to have this in the Instant Client directory but if you were on a database box or one that already has the Oracle Client on it, where else would you put it?

  3. SET LD_LIBRARY_PATH=E:\OracleInstantClient

    • Obviously to find the shared libraries shipped with Instant Client.

  4. SET SQLPATH=E:\OracleInstantClient

    • If you use a glogin.sql file, you will need to set this to find it.

4.  Connection methods for SQL*Plus. It does not matter if you install the Instant Client on the database server or on a true client machine, you will always need to specify some form of an Oracle Net connection name or identity. Here are some examples.

  1. After modifying the tnsnames.ora file that is in the directory pointed to by TNS_ADMIN you can use the following
    • Method:  sqlplus <user>/<password>@<tns_entry> 
    • example: sqlplus scott/tiger@daten
  2. If you would rather not use the tnsnames.ora naming, you can bypass this by using a more descriptive connect string.
    • Method: sqlplus <user>/<password>@//<machine>:<port>/<service_name>
    • example: sqlplus scott/tiger@//bier.pinehorse.com:1521/daten
  3. You may also wish to bypass the using of an Oracle Net name by setting the environment variables TWO_TASK (on unix) or LOCAL (on windows)
    • Method: SET LOCAL=<service_name>
               sqlplus <user>/<password>
    • example: SET LOCAL=daten
               sqlplus scott/tiger

Other Considerations

When using the Instant Client you may or may not bump up against the following extra considerations for your particular environment.

Connecting as SYSDBA/SYSOPER
You will need to put a password file on the database server you are connecting to.
NLS_LANG For Instant Client, you do not reference an $ORACLE_HOME and thus there is no setting for NLS_LANG. You may need to set this as an environment variable.
Uninstalling Instant Client Just remove the directory where you un-zipped the executables & libraries. You can also unset/remove the environment variables.

The Instant Client is available on a variety of platforms such as Linux, Solaris, HP, IBM AIX, and Windows and supports the following connection types depending on the packages you download.


OCI, OCCI, and JDBC-OCI applications

JDBC Supplement

XA, Internationalization, and RowSet operations under JDBC





The installation procedures for each of these packages at least reads as quick and easy as the SQL*Plus installation done here in this articles. The procedures basically follow what I have shown for SQL*Plus. Just be sure to visit and read the release notes for the specific packages, as there are additional, be it minor, variables or installation procedures to follow.

In a Nutshell

The only way I can conclude this article is simply to state the benefits to this new method for connecting your applications to an Oracle instance.

  1. It is free
  2. Small download times
  3. Small software footprint
  4. No reliance on typical Oracle CD installation
  5. Ease of deployment
  6. No loss of features from full-blown client
  7. Vendors may package their applications more easily without reliance on customer side installation
  8. It is free, needs to be said twice.

» See All Articles by Columnist James Koopmann

Oracle Archives

Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM