Tuesday, 21 January 2014

What is ORACLE_HOME & ORACLE_BASE..??

What is ORACLE_BASE used for?
  • The ORACLE_BASE is also an environment variable to define the base/root level directory where you will have the Oracle Database directory tree - ORACLE_HOME defined under the ORACLE_BASE directory.
  • Basically, The ORACLE_BASE directory is a higher-level directory, than ORACLE_HOME, that you can use to install the various Oracle Software Products and the same Oracle base directory can be used for more than one installation.

What is ORACLE_HOME used for?

  • The ORACLE_HOME is an environment variable which is used to set and define the path of Oracle Home (server) Directory.
  • The ORACLE_HOME directory will have the sub directories, binaries, executables, programs, scripts, etc. for the Oracle Database.
  •  This directory can be used by any user who wants to use the particular database.
  • 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.
  • Basically The ORACLE_HOME variable is in the following ORACLE_BASE directory:
    ORACLE_HOME=$ORACLE_BASE\product\11.2.0

If no profile file is set with environment variables, then physically also be set as follows:

C Shell:
% setenv ORACLE_BASE /oracle/app
% setenv ORACLE_HOME /oracle/app/product/11.2.0

On Windows Systems:
My Computer -> Properties -> Advanced -> Environment Variables -> System Variables -> New/Edit/Delete (to set the variables)

Another way to physically set the variables as follow at the DOS prompt:
C:\> set ORACLE_HOME=C:\oracle\app\product\11.2.0
C:\> echo %ORACLE_HOME%

After setting the environment variables as above, open a fresh CMD tool and check whether they set properly or not. Do not try on already opened CMD tool to make sure the variables set or not.

Note: If you did not set the ORACLE_BASE environment variable before starting OUI, the Oracle home directory is created in an app/username/directory on the first existing and writable directory from /u01 through /u09 for UNIX and Linux systems, or on the disk drive with the most available space for Windows systems. If /u01 through /u09 does not exist on the UNIX or Linux system, then the default location is user_home_directory/app/username.

Or in Windows box, if you are having C, D and E drive then by default installation will be done on Last drive available, here is E drive.

No comments:

Post a Comment