Hi everyone,
while working as an oracle dba I've come across many people who have doubt on what ORACLE_HOME and ORACLE_BASE is? I'll try to explain what these two terms exactly are.
What is ORACLE_HOME?
* The ORACLE_HOME is an environment variable which is used to set and define the path of Oracle Home (server) Directory.
* The ORACLE_HOME is an environment variable which contains the path of Oracle Home directory. It in turn contains all the sub directories, binaries, executables, scripts, etc. used by Oracle Database.
* The directory is generally used by ORACLE software and the user who installed the oracle software on the system.
* If the ORACLE_HOME variable is defined as an environment variable, then during the installation process, the Oracle Home Path will be set to the directory defined as default. If the variable is not defined, then the Oracle will take its own default location. i.e. The ORACLE_HOME variable does not have to be preset as an environment variable, it can be set during the installation process.
* Generally, ORACLE_HOME variable is referred using ORACLE_BASE directory:
ORACLE_HOME=$ORACLE_BASE/product/10.2.0.
What is the use of ORACLE_BASE directory?
* The ORACLE_BASE is like ORACLE_HOME is an environment variable used for defining base/root level directory. This is where you will have the Oracle Database directory tree : ORACLE_HOME is a level below ORACLE_BASE in the directory tree.
* Therefore, ORACLE_BASE directory is a higher-level directory, than ORACLE_HOME. Which is used for installing various Oracle Software Products and for having more than one oracle installation.
How to see if ORACLE_HOME is set already?
On Unix/Linux Systems:
$ echo $ORACLE_HOME
To check all the environment variables set:
$ env
On Windows Systems:
To check specific environment variable set:
C:\echo %ORACLE_HOME%
To check all the environment variables set:
C:\> env
One can also check ORACLE_HOME from registry.
WINDOWS+R-> Regedit (enter)
What is ORACLE_HOME?
* The ORACLE_HOME is an environment variable which is used to set and define the path of Oracle Home (server) Directory.
* The ORACLE_HOME is an environment variable which contains the path of Oracle Home directory. It in turn contains all the sub directories, binaries, executables, scripts, etc. used by Oracle Database.
* The directory is generally used by ORACLE software and the user who installed the oracle software on the system.
* If the ORACLE_HOME variable is defined as an environment variable, then during the installation process, the Oracle Home Path will be set to the directory defined as default. If the variable is not defined, then the Oracle will take its own default location. i.e. The ORACLE_HOME variable does not have to be preset as an environment variable, it can be set during the installation process.
* Generally, ORACLE_HOME variable is referred using ORACLE_BASE directory:
ORACLE_HOME=$ORACLE_BASE/product/10.2.0.
What is the use of ORACLE_BASE directory?
* The ORACLE_BASE is like ORACLE_HOME is an environment variable used for defining base/root level directory. This is where you will have the Oracle Database directory tree : ORACLE_HOME is a level below ORACLE_BASE in the directory tree.
* Therefore, ORACLE_BASE directory is a higher-level directory, than ORACLE_HOME. Which is used for installing various Oracle Software Products and for having more than one oracle installation.
How to see if ORACLE_HOME is set already?
On Unix/Linux Systems:
$ echo $ORACLE_HOME
To check all the environment variables set:
$ env
On Windows Systems:
To check specific environment variable set:
C:\echo %ORACLE_HOME%
To check all the environment variables set:
C:\> env
One can also check ORACLE_HOME from registry.
WINDOWS+R-> Regedit (enter)
Go to following :
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
How to set the ORACLE_HOME?
On Unix/Linux Systems:
Define the ORACLE_HOME value in the user profile file i.e. .bash_profile or .profile
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
On Windows Systems:
Goto:
How to set the ORACLE_HOME?
On Unix/Linux Systems:
Define the ORACLE_HOME value in the user profile file i.e. .bash_profile or .profile
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
On Windows Systems:
Goto:
My Computer -> Properties -> Advanced ->
Environment Variables -> System Variables -> New/Edit/Delete (to set the
variables)
Then open a new cmd prompt and type:
Then open a new cmd prompt and type:
C:\echo %ORACLE_HOME%
Another way using command prompt:
C:\> set ORACLE_HOME=C:\oracle\app\product\10.2.0
C:\> echo %ORACLE_HOME%
Note: Refer to oracle documentation for more exhaustive information on above topics.