Contact Premier Online Trainings Today
Premier Online Trainings

Oracle DBA - Difference between ORACLE_BASE and ORACLE_HOME

Date Added: 04 Feb.2017 Date Updated: 05 Mar.2017 Oracle DBA Full Blog

 

Overview of the Optimal Flexible Architecture (OFA)

The Optimal Flexible Architecture standard helps you to organize database software and configure databases to allow multiple databases, of different versions, owned by different users to coexist. Optimal Flexible Architecture assists in identification of ORACLE_BASE with its Automatic Diagnostic Repository (ADR) diagnostic data to properly collect incidents.

All Oracle components on the installation media are compliant with Optimal Flexible Architecture. Oracle Universal Installer places Oracle Database components in directory locations, assigning the default permissions that follow Optimal Flexible Architecture guidelines.

Oracle recommends that you use Optimal Flexible Architecture, especially if the database is huge, or if you plan to have multiple databases.

Difference between ORACLE BASE and ORACLE HOME

Oracle BASE and Oracle HOME are the directories defined by the Oracle Flexible Architecture.  Oracle Base is the top level directory or you can say root directory. Under Oracle Base you can have multiple Oracle versions with different Oracle HOME. You can have multiple oracle products under Oracle BASE directory.

In Oracle 11g, the 11g New Features Guide notes important OFA changes, namely the removal of $ORACLE_HOME as an anchor for diagnostic and alert files:

"The database installation process has been redesigned to be based on the ORACLE_BASE environment variable. Until now, setting this variable has been optional and the only required variable has been ORACLE_HOME. 

ORACLE_BASE

ORACLE_BASE specifies the directory at the top of the Oracle software and administrative file structure. The value recommended for an OFA configuration is software_mount_point/app/PROD

For example: /u01/app/PROD

If you are not using an OFA-compliant system, you do not have to set ORACLE_BASE, but it is highly recommended that you do set it.

ORACLE_HOME

ORACLE_HOME specifies the directory containing the Oracle software for a given release. The Optimal Flexible Architecture recommended value is:

$ORACLE_BASE/product/release.

Eg:- /u01/app/PROD/product/11.2.0.4

In my system following values are set.

$ . PROD.env

$ echo $ORACLE_BASE

/u01/app/PROD

$ echo $ORACLE_HOME

/u01/app/PROD/product/11.2.0.4

Example :-

diffrencebasehome

If we will install new version of Oracle database Software like 10g ,11g and 12c and creates databases for them, then Oracle will not create duplicate fast_recovery_area or oradata folder inside ORACLE_BASE. Instead inside these directories it will create a folder with database name and then copy content inside that folder

Note: For all version of Oracle Database installed on the server will have different ORACLE_HOME under same ORACLE_BASE until we change the ORALCE_BASE path.

/u01/app/PROD/product/11.2.0.4— for 11G Oracle Database Software

/u01/app/PROD/product/12.1.0.2 - for 12C Oracle Database Software

Here, we can notice for both version of Oracle database software, ORACLE_BASE is common for both ORACLE_HOME.

Oracle Database Software and Creation of database are two different actions. First we install Oracle database software and then we create database for user.