How to prepare and set the Oracle Environment?
An oraenv script is provided with every Oracle installation. Run it as part of your current environment to set the necessary environment variables like ORACLE_HOME, ORACLE_SID, etc. Never set the Oracle Home directory explicitely in a script. The following example shows how to use oraenv (non-interactively) from a script: export ORACLE_SID=ORCL; export ORAENV_ASK=NO . oraenv NOTE: the “. ” in front of “oraenv” is required to run the script as part of the current shell.