10 Replies Latest reply: Mar 19, 2014 2:07 AM by Tom321 RSS

    Do not place Grid ORACLE_HOME below ORACLE_BASE??

    Lonion

      I'm reading <<Oracle 11g RAC and Grid Infrastructure Administration>>. Below is a slide from it.

                                                                                                                     ASM Components:

                                                                                                                             Software

      For ASM installation of software:

      • The directories are located by the operating system environment variables.

      – ORACLE_BASE is the top-level directory for a particular software owner.

      – ORACLE_HOME is used to identify the top-level directory of the Grid Infrastructure software.

      • Use a common ORACLE_BASE for all Oracle products owned by the same user.

      • Use an isolated ORACLE_HOME location from other Oracle products even if they are the same version.

      • Do not place Grid ORACLE_HOME below ORACLE_BASE.

      • ORACLE_HOME requires 3 GB to 5 GB of disk space.

       

      > • Do not place Grid ORACLE_HOME below ORACLE_BASE.

      How do understand it?

        • 1. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
          FreddieEssex

          Typically ORACLE_BASE would always be a parent directory of ORACLE_HOME.

           

          For example ORACLE_BASE might be /u01/app/oracle

          ORACLE_HOME might be /u01/app/oracle/grid/11.2.0

          • 2. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
            Lonion

            According to your answer, Do not place Grid ORACLE_HOME below ORACLE_BASE」 is a wrong opinion?

            • 3. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
              Hemant K Chitale

              The recommendation is correct.  GRID_HOME should be separate.  The root.sh script for the GRID_HOME changes ownership and permissions for certain files to rooot so it should be separate.

               

              Hemant K Chitale

              • 4. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                Lonion

                Hi, Hemant K Chitale. Thank you for replying.

                 

                This is my real product environment.

                [grid@rac1 ~]$ id

                uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1100(asmadmin),1300(asmdba),1301(asmoper)

                [grid@rac1 ~]$

                [grid@rac1 ~]$ cat .bash_profile

                # .bash_profile

                 

                 

                # Get the aliases and functions

                if [ -f ~/.bashrc ]; then

                        . ~/.bashrc

                fi

                 

                 

                # User specific environment and startup programs

                 

                 

                export PATH=$PATH:$HOME/bin

                 

                 

                export TMP=/tmp

                export TMPDIR=$TMP

                export ORACLE_SID=+ASM1

                export ORACLE_BASE=/app/grid

                export ORACLE_HOME=/app/grid/11.2.0

                export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"

                export THREADS_FLAG=native

                export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/oui/bin:$PATH

                [grid@rac1 ~]$

                 

                export ORACLE_SID=+ASM1

                export ORACLE_BASE=/app/grid

                export ORACLE_HOME=/app/grid/11.2.0

                 

                Regarding this configuration, is it right?

                • 5. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                  FreddieEssex

                  It's the way I do it:  Oracle Grid Infrastructure for a Standalone Server

                   

                  In this example they use ORACLE_BASE as /u01/app/oracle and ORALCE_HOME as /u01/app/oracle/product/11.2.0/grid.

                   

                  Section 3.1.3:

                  Ensure that you set the path to the Oracle base directory. Oracle Restart and Oracle Database are under the same Oracle base directory. For example:


                  See section 3.12:

                  For example, if the Oracle ASM SID is named +ASM and the Oracle home is located in the grid subdirectory of the ORACLE_BASE directory, then enter the following commands to create the required settings:

                  • 6. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                    BPeaslandDBA

                    I can tell you one of the things that can occur if you do not follow this advice. I learned this the hard way...I had the following set up:

                     

                    GRID_HOME   /u01/app/crs11.2.0.2

                    ORACLE_BASE  /u01/app/oracle

                    ORACLE_HOME /u01/app/oracle/product/11.2.0.2

                    datafiles   /u01/app/oracle/oradata

                     

                    Notice that GRID_HOME was underneath all of those. I then did the following:

                     

                    cd $GRID_HOME/deinstall

                    ./deinstall

                     

                    What happened next was that GI was uninstalled. And the deinstall utility also removed ORACLE_BASE, ORACLE_HOME, and the worst part...my datafiles. Ugh!

                     

                    HTH,
                    Brian

                    • 7. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                      Levi Pereira

                      Lonion,

                      About this subject there is nothing to discuss, you must follow documentation of release which you are installing and everything will work.

                       

                       

                      Advanced Installation Oracle Grid Infrastructure for a Cluster Preinstallation Tasks

                      Caution

                      For Oracle Grid Infrastructure for a Cluster installations, note the following restrictions for the Oracle Grid Infrastructure binary home (Grid home):

                      • 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

                      During installation, ownership of the path to the Grid home is changed to root. This change causes permission errors for other installations.

                      • 8. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                        Tom321

                        Hi Lonion,

                         

                        this is what i'm using for 11.2.0.3 rac environments:

                         

                        mkdir -p /oracle/11.2.0/grid    (Gridbase: after Installation  root:oinstall 755 )

                        mkdir -p /oracle/grid        (Gridhome)

                        mkdir -p /oracle/orabase/ora11g     (Oraclehome

                        mkdir -p /oracle/oraInventory    (Inventory)

                        chown -R grid:oinstall /oracle

                        chown -R oracle:oinstall /oracle/orabase

                        chmod -R 775 /oracle

                         

                         

                        After grid and db installer is finished it looks like this:

                         

                        drwxr-xr-x   3 root     oinstall       3 Jan  2  2013 11.2.0

                        drwxrwxr-x  11 grid     oinstall      11 Sep  6  2013 grid

                        drwxrwx---   6 grid     oinstall       8 Dec  9 11:28 oraInventory

                        drwxrwxr-x   9 oracle   oinstall       9 Nov 27 11:22 orabase

                         

                         

                        As Levi has pointed out, Gridhome must not be a subdirectory of gridbase, because of the permission change to root.  It works good in production and hopefully survives a deinstall of grid base after e.g. an upgrade.

                         

                        Regards

                        Thomas

                        • 9. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                          Lonion

                          Can you offer an example for me? the environment variable of grid user and oracle user.

                          • 10. Re: Do not place Grid ORACLE_HOME below ORACLE_BASE??
                            Tom321

                            custom entrys in .profile for solaris:

                             

                            GRID:

                             

                            ORACLE_BASE=/oracle/grid

                            ORACLE_HOME=/oracle/11.2.0/grid

                            ORACLE_SID=+ASM1

                            LD_LIBRARY_PATH=$ORACLE_HOME/lib

                            PATH=$PATH:$ORACLE_HOME/bin

                            AWT_TOOLKIT=XToolkit

                            TZ=Europe/Berlin

                            TEMP=/tmp

                            TMPDIR=/tmp

                             

                            export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH PATH ORACLE_SID AWT_TOOLKIT TZ TEMP TEMPDIR

                             

                            ulimit -t unlimited

                            ulimit -f unlimited

                            ulimit -d unlimited

                            ulimit -s unlimited

                            ulimit -v unlimited

                             

                             

                            ORACLE:

                             

                            ORACLE_BASE=/oracle/orabase

                            ORACLE_HOME=/oracle/orabase/ora11g

                            LD_LIBRARY_PATH=$ORACLE_HOME/lib

                            PATH=$PATH:$ORACLE_HOME/bin:/oracle/orabase/ora11g/owb/bin

                            AWT_TOOLKIT=XToolkit

                            TZ=Europe/Berlin

                            TEMP=/tmp

                            TMPDIR=/tmp

                             

                            export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH PATH AWT_TOOLKIT  TZ TEMP TEMPDIR

                             

                            ulimit -t unlimited

                            ulimit -f unlimited

                            ulimit -d unlimited

                            ulimit -s unlimited

                            ulimit -v unlimited

                             

                            Regards

                            Thomas