Managing Unix environment variables

Body: 

To check what environment variables are set for your user, enter:

env | grep -e ORA -e TNS -e SQL

NOTE: Use /usr/xpg4/bin/grep instead of grep on Solaris.

Here are a few basic ORACLE environment variables. More environment variables,
can be found in the Oracle for Unix Installations Guides.

  • LD_LIBRARY_PATH - Path to library files. Eg: /usr/lib:/usr/openwin/lib:$ORACLE_HOME/lib:/usr/games/lib

  • ORACLE_BASE - Full path name to the base directory for all versions of Oracle products.

  • ORACLE_HOME - Full path name to the version of ORACLE you are currently using. ORACLE_HOME is normally found beneath ORACLE_BASE in the directory tree. This variable is used to find executable programs and message files.

  • ORACLE_SID - ORACLE Server system identifier (SID) or instance name. The database name is used as ORACLE_SID. This is required for all ORACLE products and is set by the coraenv script.

  • ORACLE_PATH - Defines the path names to locate files. If ORACLE_PATH is set, the application searches the directories specified by $ORACLE_PATH first, then the current directory. If ORACLE_PATH is not set, then the application uses the current directory. This variable is used by SQL*Plus, Forms and Menu.

  • ORACLE_TERM - Defines a terminal definition. If not set, it defaults to the value of your TERM environment variable. Used by all character mode products.

  • ORAENV_ASK This will not ask for ORACLE_SID, it will take it as it is specified. This variable is normally set to "NO" before oraenv is invoked from a script.

  • TNS_ADMIN - Defines the path name to the TNS (Transparent Network Substrate) files like TNSNAMES.ORA, SQLNET.ORA etc.

  • ORACLE_TRACE - Trace Oracle's Unix shell scripts as they execute (using set -x).

  • TWO_TASK - The TWO_TASK environment variable specifies a SQL*Net connect string for connecting to a remote machine in a client/server configuration. SQL*Net will check the value of TWO_TASK and automatically add it to your connect string.

    For example the following are equivalent:

    sqlplus scott/tiger@db1 and

    export TWO_TASK=db1
    sqlplus scott/tiger

  • SQLPATH - Search path used by sqlplus to locate SQL scripts

Comments

I have installed Oracle 9i client tools on my XP Pro machine, but the Oracle ODBC driver does not show up as a choice in Data Source Administrator