Oracle Environment Variables

Environment Variables
The oraenv file is often used to set environment variables for Oracle. Below are
some environment variables to be set when using ORACLE.

To display current values of all environment variables enter: env | sort
To display the value of an environment variable, enter: echo $VARIABLE_NAME
To set the value of an environment variable, enter: VARIABLE_NAME=value;

EPC_DISABLED Disables Oracle Trace or otrace. Look at otrccref. Syntax: TRUE or FALSE
LD_LIBRARY_PATH List of directories that the shared library loader searches to locate shared object
libraries at runtime. See the ld man page for information on this environment variable.
(Eg: /usr/lib:/usr/openwin/lib:$ORACLE_HOME/lib:/usr/games/lib)
NLS_LANG Specifies the language, territory, and character set of the client environment. The character set specified by
NLS_LANG can be different from the database character set, in which case Oracle automatically converts the character set.
Syntax – language_territory.characterset.
To check NLS_LANG environment value run:
echo $NLS_LANG. &nbspSee findNLS_LANG.sql or
check the database NLS settings:

col parameter for a40
col value for a40
select parameter,value from NLS_DATABASE_PARAMETERS where parameter in('NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET');

PARAMETER                      VALUE
------------------------------ --------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CHARACTERSET               WE8ISO8859P1
ORA_NLS33 Directory where NLS_LANG definition files are stored.
Must be set in order to create a database in a character set other than US7ASCII.
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_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 SQLPlus, Forms and Menu.
ORACLE_SID ORACLE Server system identifier (SID) or instance name.
The database name or db_name is used as ORACLE_SID. This is
required for all ORACLE products and is set by the coraenv or oraenv script.
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.
ORACLE_TRACLE Trace Oracle’s Unix shell scripts as they execute (using set -x).
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.
SQLPATH Specifies the directory or list of directories that SQLPlus searches for a login.sql file.
TNS_ADMIN Defines the path name to the TNS (Transparent Network Substrate) files like
TWO_TASK The TWO_TASK environment variable specifies a SQLNet connect string for connecting to a
remote machine in a client/server configuration. SQLNet 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

Related Commands:

Related Views:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: