I have used for GRID_HOME and DB_HOME the following locations:
- GRID_HOME: /oracle/12/grid
- DB_HOME: /oracle/12/db
- DB_HOME and GRID_HOME user:group is oracle:oinstall
For oracle base, I have used
- /oracle/12c/base (for this one, installation produces warning, because DB_HOME is not inside $ORACLE_BASE, but I can go through with it)
- or /oracle/12c
Is this necessary that DB_HOME must be inside ORACLE_BASE, so that DB_HOME=$ORACLE_BASE/db ??
For 19c standalone installation, it produces warning for the cluster installation, if I used
- GRID_HOME: /oracle/19c/grid
- DB_HOME: /oracle/19c/db
- ORACLE_BASE: /oracle/19c
[INS-32022] Grid infrastructure software for a cluster installation must not be under an Oracle base directory.
Cause - Grid infrastructure for a cluster installation assigns root ownership to all parent directories of the Grid home location.
As a result, ownership of all named directories in the software location path is changed to root, creating permissions errors for all subsequent installations into the same Oracle base.
Action - Specify software location outside of an Oracle base directory for grid infrastructure for a cluster installation.
So instead of using /oracle/19c for oracle base, I can use /oracle/19c/base for base, and then /oracle/19c/base/db for DB_HOME.
But I am wondering, what would be the preferred location for GRID_HOME, ORACLE_BASE and DB_HOME in cluster installation, starting with location /oracle/19c/…?
+++
The ORACLE_BASE terminology and use is slightly different between the DB and the GI stack. At least that is the way I look at it. In the case of the DB stack (say with owner ‘oracle’) the Oracle Home is underneath its base. However for the GI stack (say with owner ‘grid’) the base is where primarily all of the Clusterware related logs go in.
For example in my environment I have –
oracle (DB):
B: /u01/app/oracle
H: /u01/app/oracle/product/<Release#>/dbhome_1
grid (GI):
B: /u01/app/grid
H: /u01/app/<Release#>/grid
In addition of course the ownership and permissions are to be taken care of appropriately as well.
+++
If both GH and DB user is oracle, is it OK, that the oracle base is the same for both..?
+++
With the same user ‘oracle’ for both of the GI and DB stack I guess there is no choice and instead the base would be the same. Personally I prefer and keep it separate for various reasons. However have seen some shops having a single user.
+++
It’s in the Oracle Grid Infrastructure Installation Guide for LInux:
Caution:
For Oracle Grid Infrastructure for a cluster installations, note the following restrictions for the Oracle Grid Infrastructure binary home (Grid home directory for Oracle Grid Infrastructure):
- It must not be placed under one of the Oracle base directories, including the Oracle base directory of the Oracle Grid Infrastructure installation owner.
- It must not be placed in the home directory of an installation owner.
These requirements are specific to Oracle Grid Infrastructure for a cluster installations. Oracle Grid Infrastructure for a standalone server (Oracle Restart) can be installed under the Oracle base for the Oracle Database installation.
+++
In a small shop, where there is no “separation of duties”, it seems to make sense. In my own shop, I am the only oracle DBA, and of the databases I manage only 1 prod/test pair use Grid, and that is just for ASM, with no RAC. It would be a real pain if I were always logging off and back on just to “change hats.”