Oraenv

From Oracle FAQ
Jump to: navigation, search

Oraenv and coraenv are Unix/ Linux command line utilities that sets the required environment variables (ORACLE_SID, ORACLE_HOME and PATH) to allow a user to connect to a given database instance. If these environment variables are not set, commands such as SQL*Plus, imp, exp, or any other utility for that matter, will not work (or not be found).

Use coraenv when using the C Shell and oraenv when using a Bourne, Korn or Bash shell.

Note the syntax: ". oraenv" or {period} {space} oraenv.

Examples[edit]

Interactive:

$ . oraenv
ORACLE_SID = [] ? orcl

Non-interactive (handy for scripting):

$ export ORACLE_SID=orcl
$ export ORAENV_ASK=NO
$ . oraenv

Also see[edit]