Setting ORACLE_BASE, ORACLE_HOME for RAC installaions

Introduction to Oracle Base

Oracle® Universal Installer and OPatch User's Guide 11g Release 2 (11.2) for Windows and UNIX
Chapter 2: Introduction to Oracle Base

The Oracle base location is the location where Oracle Database binaries are stored. During installation, you are prompted for the 
Oracle base path. Typically, an Oracle base path for the database is created during Oracle Grid Infrastructure installation.

To prepare for installation, Oracle recommends that you only set the ORACLE_BASE environment variable to define paths for Oracle 
binaries and configuration files. Oracle Universal Installer (OUI) creates other necessary paths and environment variables in 
accordance with the Optimal Flexible Architecture (OFA) rules for well-structured Oracle software environments.

For example, with Oracle Database 11g, Oracle recommends that you do not set an Oracle home environment variable allow OUI to 
create it instead. If the Oracle base path is /u01/app/oracle, then by default, OUI creates the following Oracle home path:

/u01/app/oracle/product/11.2.0/dbhome_1

Ensure that the paths you select for Oracle software, such as Oracle home paths and the Oracle base path, use only ASCII characters. 
Because installation owner names are used by default for some paths, this ASCII character restriction applies to user names, file 
names, and directory names.

Installing Oracle Grid Infrastructure and Oracle Real Application Clusters

Oracle® Database 2 Day + Real Application Clusters Guide 11g Release 2 (11.2)
Chapter 3 : Installing Oracle Grid Infrastructure and Oracle Real Application Clusters
Configuring the Operating System Environment

You run OUI from the oracle user account. Before you start OUI to install Oracle Grid Infrastructure for a cluster, you do not have
to configure the environment of the oracle user. You can specify the directories to use for the central inventory and the Grid home
during the installation process.

However, you can set the ORACLE_BASE environment variable to the directory in which you want the Oracle Inventory files located.
For example, if you plan to make the Oracle Database home directory /u01/app/oracle/product/11.2.0/dbhome_1, then you would set
ORACLE_BASE to the directory /u01/app/oracle/. If you set the ORACLE_BASE directory before installation, then this becomes the
default location for the central inventory displayed by OUI.

You can also set the ORACLE_HOME environment variable to the location chosen for the Grid home. If you set the ORACLE_HOME directory
before installation, then this becomes the default location for the Grid home displayed by OUI.

(Optional) To modify the user environment before installing Oracle Grid Infrastructure for a cluster on Oracle Linux:
As the oracle user, execute the following commands:
[oracle]$ unset ORACLE_HOME
[oracle]$ unset ORACLE_SID
[oracle]$ unset ORACLE_BASE
[oracle]$ export ORACLE_BASE=/u01/app/oracle/
[oracle]$ export ORACLE_HOME=/u01/app/11.2.0/grid

Verify the changes have been made by executing the following commands:
[oracle]$ echo $ORACLE_SID
[oracle]$ echo $ORACLE_HOME
/u01/app/11.2.0/grid
[oracle]$ echo $ORACLE_BASE
/u01/app/oracle/

Sample Setup

 Grid software (example for release 11.2.0.4):
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/11204/grid
    --> The Oracle Grid software is installed outside of Oracle base !

 Database software (example for release 11.2.0.4):
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/oracle/product/11204/dbhome_1

References

One thought on “Setting ORACLE_BASE, ORACLE_HOME for RAC installaions”

Leave a Reply

Your email address will not be published. Required fields are marked *