Environment Variables for Oracle Instant Client

Learn about some common Oracle environment variables that can influence Oracle Instant Client installations.

Table 6-7 Common Environment Variables for Oracle Instant Client

Environment Variable Description For More Information

LD_LIBRARY_PATH

Used on Linux and some UNIX platforms. Set this to include the Oracle Instant Client libraries, for example $ORACLE_HOME/lib or /opt/oracle/instantclient_19_10. Not needed if the libraries are located by an alternative method, such as from running ldconfig. On other platforms you will need to set the OS specific equivalent, such as LIBPATH or SHLIB_PATH.

Oracle Database Administrator's Reference

NLS_LANG

If necessary, set the NLS_LANG environment variable. The NLS_LANG environment variable sets the language and territory used by the client application and the database server. It also sets the client's character set, which is the character set for data entered or displayed by a client program.

If not set, a default value will be chosen by Oracle Instant Client.

Oracle Database Globalization Support Guide

TNS_ADMIN

The location of the optional Oracle Net configuration files and Oracle Instant Client configuration files, including tnsnames.ora, sqlnet.ora, and oraaccess.xml, if they are not in the default location.

If TNS_ADMIN is not set, then the instantclient_19_10/network/admin subdirectory should contain your Oracle Net Services configuration files.

Oracle Database Net Services Administrator's Guide

ORA_TZFILE

Oracle Instant Client can use the ORA_TZFILE environment variable to read the time zone file from the file system when this environment variable is set.

If ORA_TZFILE is not set, then Oracle Instant Client uses the larger, default, timezlrg_n.dat file from the shared libraries. If you want Oracle Instant Client to use the smaller timezone_n.dat file, then set the ORA_TZFILE environment variable to the name of the file without any absolute or relative path names.

For example:

$ export ORA_TZFILE=timezone_n.dat

Where, n is the time zone data file version number.

Run the genezi -v command to determine the client library timezone information.

To use an external time zone file, create an oracore/zoneinfo subdirectory under the Oracle Instant Client directory, and move the time zone file into this oracore/zoneinfo subdirectory. Now, set ORA_TZFILE to the time zone file name, without any absolute or relative path names.

Oracle Database Administrator's Reference

ORA_SDTZ

Specifies the default session time zone.

Oracle Database Globalization Support Guide