What is Oracle's instant client and how do I install it?
Oracle's instant client use
What is it?
It is free, easy to install client software for connecting to Oracle databases. It's available on a variety of platforms (Windows, Mac, Solaris, Linux, AIX, and more).
It consists of four different component: basic (or basic-lite), JDBC, SQLPlus and SDK. You must install basic or basic-lite. The rest are optional, and may be installed at a later time with no hassle.
- basic is required. It provides core functionality for all OCI, OCCI and JDBC-OCI applications. The basic-lite offers an an even smaller footprint at the expense of reduced localization support and functionality. Most people will be better off choosing basic.
- JDBC expands the JDBC functionality available. If you use Java, take this.
- SQLPlus provides an instantclient version of the command-line client tool, SQL*Plus. If you use SQL*plus or would like a command-line query tool, you will want this. This can also be very handy to verify connectivity and credentials work.
- SDK provides additional header files for compiling applications against instantclient. If you are compiling software against the Oracle client, do take this.
To give you an idea of space required, on 32 bit Linux:
- basic requires around 97MB, whereas basic-lite requires 32MB.
- JDBC requires an additional 1.6MB
- SQLPlus requires an additional 2.5MB
- SDK requires an additional 2MB
By contrast, the full Oracle client installation usually consumes over 500mb.
Where do I get it?
Directly from Oracle. It's free.
See the Oracle site for client and server version compatibility information.
How do I install it?
An installation document is available on the Oracle site. But the guide for the impatient is:
1) Download basic plus any of the three additional components you wish.
2) Unzip the files. They will create an instantclient_10_2 directory in your current directory. Move instantclient_10_2 to wherever you wish your Oracle home to be permanently located.
3) Set $ORACLE_HOME to point to the new location in #2.
4) Add $ORACLE_HOME to your LD_LIBRARY_PATH and RUNPATH.
How does name resolution work?
This can be a complicated topic. However, most people will use one of two methods.
If you were using a tnsnames.ora file before, you can continue to do so. The instant client setup does not create this by default, but it is easy to do:
1) mkdir -p $ORACLE_HOME/network/admin
2) cd [directory containing your old copies of tnsnames.ora and sqlnet.ora]
3) cp tnsnames.ora sqlnet.ora $ORACLE_HOME/network/admin
That's it. Instant client works as the full client does, and will use sqlnet.ora for various client options (default Oracle domain, encryption settings, etc).
You can use a new EZConnect syntax. Rather than specifying a SID, you specify all the information in the connect string to build the connection. The format is:
The documentation will contain the full details on using the EZConnect syntax.