Oracle Instant Client FAQ


Questions



Answers


What is Instant Client?

Instant Client is a repackaging of Oracle Database libraries, tools and header files usable to create and run applications that connect to a remote (or local) Oracle Database. Instant Client can be used to run OCI, OCCI, Pro*C, JDBC and ODBC applications, and can be used to run scripting language drivers including PHP's OCI8, Python's cx_Oracle, Node.js's node-oracledb and Ruby's ruby-oci8 APIs. An SDK package provides header files for compiling C and C++ programs that use the OCI and OCCI APIs. Some utilities such as SQL*Plus, Workload Replay Client, Data Pump and SQL*Loader are also available in Instant Client packages. The available Instant Client packages are described on the Instant Client home page.

Why use Instant Client?

Instant Client's advantages are that installation is a quick unzip of a ZIP package, or the trivial install of Linux RPM packages. Instant Client's footprint is much, much smaller than the full Oracle Client. Other advantages are that it is available under an OTN license that allows redistribution. Your Instant Client-based applications can take full advantage of Oracle Client features such as caching and connection pooling; they can take advantage of Oracle Net features such as network encryption; and of course they can use big and small Oracle Database features.

What is the interoperability of Instant Client with various database versions?

An Instant Client based application can interoperate with any database version that the full Oracle Client interoperates with. For example, Instant Client 12.2 allows connection to 11.2, 12.1 and 12.2 databases. Details are in the interoperability matrix in Support Doc ID 207303.1

Where is Instant Client available from?

You can install Instant Client packages from OTN. Oracle Linux users can install it from ULN. It is also an install option when installing a full Oracle Client. Instant Client is made available in parallel with each Oracle Database Release. Several platforms including Apple macOS also have Instant Client packages but do not have a Database or full Client.

What does Instant Client cost?

Instant Client is free from OTN for anyone to use in a development or production environment. However, customers can only call Oracle Support if they already have a standard support contract.

Can Instant Client be redistributed?

Subject to the license, Instant Client can be bundled and redistributed for free. Enterprises can redistribute Instant Client within their organizations. However, customers can only call Oracle Support for Instant Client if they have a standard support contract. Please refer to the Oracle Technology Network License Agreement.

How do I specify connection strings in Instant Client mode?

All Oracle Net naming methods that do not require using ORACLE_HOME (to locate configuration files such as tnsnames.ora or sqlnet.ora) work in the Instant Client mode.

For C and C++ -based applications the connect string can be specified in the following formats:

An Easy Connect string of the form:

[//]host_name[:port][/service_name][:server_type][/instance_name]

such as:

localhost/pdborcl

As an Oracle Net keyword-value pair. For example:

"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=dlsun242)
(PORT=5521))
(CONNECT_DATA=(SERVICE_NAME=bjava21)))"

Naming methods that require TNS_ADMIN to locate configuration files continue to work if the TNS_ADMIN environment variable is set.

If the TNS_ADMIN environment variable is not set, and TNSNAMES entries such as inst1, and so on, are used, then the ORACLE_HOME variable must be set, and the configuration files are expected to be in the $ORACLE_HOME/network/admin directory.

Please note that the ORACLE_HOME variable in this case is only used for locating Oracle Net configuration files, and no other component of Client Code Library (OCI, NLS, and so on) uses the value of ORACLE_HOME.

The bequeath adapter or the empty connect strings are not supported. However, an alternate way to use the empty connect string is to set the TWO_TASK environment variable on UNIX, or the LOCAL variable on Windows, to either a tnsnames.ora entry or an Oracle Net keyword-value pair. If TWO_TASK or LOCAL is set to a tnsnames.ora entry, then the tnsnames.ora file must be able to be loaded by TNS_ADMIN or ORACLE_HOME setting.

Does Instant Client work with Oracle Names?

No, Instant Client does not work with Oracle Names. While Instant Client is backwards compatible with older databases, it does not support now deprecated features, including Oracle Names. Please see the Metalink Note.

How does Instant Client interact with an ORACLE_HOME?

As long as the library loading path has the directory containing Instant Client files (e.g. the instantclient directory) ahead of library directory in ORACLE_HOME, the application will operate in the Instant Client mode, and the libraries in the ORACLE_HOME will not be used.

What behavior changes can I expect for Oracle environment variables?

Environment variables ORA_NLS33, ORA_NLS32, and ORA_NLS are ignored in the Instant Client mode. The ORA_TZFILE environment variable should be set to the name of the large timezone file as opposed to its full path. All other environment variables (such as NLS_LANG) have no change in behavior.

Why do I get an error with the message "message file not found"?

Some Oracle applications are currently certifying operation under Instant Client. Once certification is complete, the message will disappear.

Why do I see an increased virtual memory footprint when running my applications in conjunction with Instant Client?

The Instant Client libraries occupy a virtual address space that is equal to the size of the files. However, only frequently used error messages from the libraries occupy physical memory. Under most cases, the physical memory load is a few kilobytes despite the larger reserved virtual address space.

How can Instant Client on Windows use registry settings?

Special settings for Instant Client enabled applications can be set in the registry for all users or on a per-user basis.
1. Using a registry editor (regedit or regedt32), go to HKEY_LOCAL_MACHINE\SOFTWARE for a global setting (or HKEY_LOCAL_MACHINE\HKEY_CURRENT_USER\SOFTWARE for each specific user).
2. Add ORACLE group key.
3. Add a new string value within the ORACLE key for the different settings you are interested in (NLS_LANG, TNS_ADMIN, etc.). For keys that are directories, use a fully qualified path.

How does Instant Client interact with an existing ORACLE_HOME-based client installation?

If you already have Oracle Client installed on your machine, then we recommend:
1. Do NOT unzip or copy the Instant Client libraries to either of ORACLE_HOME/lib or ORACLE_HOME/bin directories, to avoid overwriting files and leaving the installation in an inconsistent state. In general, we recommend putting the Instant Client libraries into a separate clean directory.
2. Do NOT put both the Instant Client directory AND the Oracle Client directory in the Library Path, regardless of ordering. Please use either one or the other in the Library Path (LD_LIBRARY_PATH or PATH, depending on platform), but not both, based on the version you wish to use.

How do I ensure that my Oracle Net files like "tnsnames.ora" and "sqlnet.ora" are being used in Instant Client?

Files like "tnsnames.ora", "sqlnet.ora" and "oraaccess.xml" will be located by Instant Client by setting the TNS_ADMIN environment variable or registry entry to the directory containing the files. Use the full directory path; do not include a file name.

Can LDAP be used with Instant Client?

Yes, LDAP can be used with Instant Client, as of 10.1.0.4.

Is Pro*C supported in Instant Client?

Yes, Pro*C is supported to run with Instant Client 10.2.0.x on Unix platforms. Pro*C is not supported with Instant Client on Windows currently.