10 Replies Latest reply on Jul 10, 2020 10:48 PM by Dude!

    How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x

    Laury

      Hi,

       

      How to relocate an Oracle Home for an Oracle RDBMS 19c?

       

      In the past, for Oracle RDBMS 10c, I used to do something like:

       

      1) List all Oracle Home in the Inventory:

      $ORACLE_HOME/OPatch/opatch lsinventory -all

       

      2) Detach current Oracle Home from current Global Inventory:

      ./runInstaller -silent -ignoreSysPrereqs -detachHome ORACLE_HOME="/appl/oracle_a/product/10.2.0" ORACLE_HOME_NAME="OracleHome102TGBI"

       

      3) Attach the new Oracle Home to Global Inventory:

      ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/d01/appl/oracle_a/product/10.2.0" ORACLE_HOME_NAME="OracleHome102TGBI"

       

      4) Update oratab accordingly with the new Oracle Home preferably after instance shutdown.

       

      But it seem the switch ignoreSysPrereqs and detachHome do not exist anymore.

       

      Thanks by advance for any tip.

       

      Kind Regards

        • 1. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
          Dude!

          What is the reason for relocating? Disk space?

           

          Just copy the whole enchilada to a new home, e.g. /u02

           

          # cd /u01/oldhome

          # tar -cf - . | (cd /u02/newhome; tar -xf -; sync)

          # rm -rf /u01/oldhome

           

          Then create a symbolic link:

           

          # ln -s /u01/oldhome /u02/newhome

           

          Anything accessing /u01/oldhome will automatically be redirected to /u02/newhome and no configuration changes are required.

          • 2. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
            Laury

            There can be some reasons to relocate:

            1) Not enough disk space

            2) Change of the standards due to new or reviewed naming conventions

            3) Wrong namings and/or mixing products

             

            What you describe, is the "physical" relocation at operating system level, using a symbolic link.

            What if you really relocate without a symbolic link? How to update the Inventory?

             

            I did it in the past with 10g, without symbolic link, and with the above commmands.

            But I can do it with 19c. I would expect something similar with 19c.

             

            Any experience with it?

             

            Kind Regards

            • 3. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
              Andy404

              Don't do it.  It's unsupported.  If it were possible, it would be messy.  I'm usually one to take on the impossible as a just another challenge.  It was faster to uninstall/install.

               

              See Doc ID 423285.1

              1 person found this helpful
              • 4. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
                Dude!

                What you describe, is the "physical" relocation at operating system level, using a symbolic link.

                What if you really relocate without a symbolic link? How to update the Inventory?

                Whether you physically relocate the installation, or simply put it in another directory on the same device is irrelevant to using a soft symlink. You can also rename the old directory and create a "soft" symlink (ln -s) to redirect anything referencing the old directory. It doesn't have to involve copying or different devices. Hence I was asking what you are trying to accomplish.

                 

                Using symlinks is a common practice. For example, under RHEL 8, several root directories are in fact symlinks to /usr.

                 

                [root@localhost /]# ls -l

                total 32

                lrwxrwxrwx.   1 root root    7 Mar  7  2019 bin -> usr/bin

                dr-xr-xr-x.   5 root root 4096 Apr  9 12:58 boot

                lrwxrwxrwx.   1 root root    7 Mar  7  2019 lib -> usr/lib

                lrwxrwxrwx.   1 root root    9 Mar  7  2019 lib64 -> usr/lib64

                 

                 

                So why do you want to make it more complex than necessary and potentially jeopardize your working installation, when a symlink can simply accomplish the task and you are done in seconds without the need to change the configuration of your installation?

                • 5. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
                  Laury

                  @3753173:

                  The link is indeed the official reference from Oracle, but I have to say it does not look up-to-date.

                  I am not sure it is always faster to uninstall/reinstall when you have aleady a database in use.

                   

                  @Dune!:

                  I do not try to make it more complex.

                  I have asked if there is such a feature for 19c to rename the Oracle Home in the Inventory (having in mind that it needs also to be relocated physically - eitheir with a symbolic linc or not).

                  I posted in the beginning how I have did once with 10g (that's quite a long time ago), with the help of Oracle Support.

                  I did not find such options with the runInstaller.

                  I am now convinced there is no way to do so with an Oracle utility.

                   

                  Kind Regards

                  • 6. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
                    EdStevens

                    Laury wrote:

                     

                    Hi,

                     

                    How to relocate an Oracle Home for an Oracle RDBMS 19c?

                     

                    In the past, for Oracle RDBMS 10c, I used to do something like:

                     

                    1) List all Oracle Home in the Inventory:

                    $ORACLE_HOME/OPatch/opatch lsinventory -all

                     

                    2) Detach current Oracle Home from current Global Inventory:

                    ./runInstaller -silent -ignoreSysPrereqs -detachHome ORACLE_HOME="/appl/oracle_a/product/10.2.0" ORACLE_HOME_NAME="OracleHome102TGBI"

                     

                    3) Attach the new Oracle Home to Global Inventory:

                    ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/d01/appl/oracle_a/product/10.2.0" ORACLE_HOME_NAME="OracleHome102TGBI"

                     

                    4) Update oratab accordingly with the new Oracle Home preferably after instance shutdown.

                     

                    But it seem the switch ignoreSysPrereqs and detachHome do not exist anymore.

                     

                    Thanks by advance for any tip.

                     

                    Kind Regards

                    Why does it "seem" that those options (ignoreSysPrereqs and detachHome) do not exist?  They certainly exist int the 19c documentaion:

                     

                    https://docs.oracle.com/cd/B28359_01/em.111/b31207/c_oui_appendix.htm#OUICG379

                    • 8. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
                      EdStevens

                      Dude! wrote:

                       

                      You're showing us the URL for 11g.

                      Indeed. 

                      I had included '19c' in my google search, and failed to pick up that the link I went to was not 19c.

                      And now, with that pointed out, I went to the 19c-specific booklist -(https://docs.oracle.com/en/database/oracle/oracle-database/19/books.html ) in search of the 19c version of that document.  Can't find it.  No idea where Oracle buried that information for 19c.

                       

                      Wiping egg off my face . . . 

                      • 9. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
                        Dude!

                        @Dune!:

                        I do not try to make it more complex.

                        I have asked if there is such a feature for 19c to rename the Oracle Home in the Inventory (having in mind that it needs also to be relocated physically - eitheir with a symbolic linc or not).

                        I posted in the beginning how I have did once with 10g (that's quite a long time ago), with the help of Oracle Support.

                        I did not find such options with the runInstaller.

                        I am now convinced there is no way to do so with an Oracle utility.

                         

                        If you want to know if there is still a feature in 19c to rename the Oracle Home in the Inventory, like you did in 10g, then you should have asked accordingly. In that case you could or should have tried the documentation first before asking. I'm sure you can search the documentation or try yourself to find out if the old 10g procedure is still available.

                         

                        But you didn't. You clearly asked:

                         

                        How to relocate an Oracle Home for an Oracle RDBMS 19c?

                         

                        This was the question I felt inclined to answer, or tip as you asked for.  And unless you can tell me your reason for relocating, instead of giving me possible or theoretical reasons when asked in return, I still think your plan is more complex than necessary.

                         

                        Anyway, do whatever you think is right. But since you marked the question as assumed answered, I hope you don't mind me asking what you are going to do.

                        • 10. Re: How to relocate an existing Oracle 19c single instance Oracle Home on OEL 7.x
                          Dude!

                          I'm not particularly partial to eggs or making it a habit of tossing them around.

                           

                          I just tried the following:

                           

                          [oracle@localhost ~]$ . oraenv <<< ORCL

                          [oracle@localhost ~]$ find $ORACLE_HOME -name runInstaller

                          [oracle@localhost ~]$ /u01/app/oracle/product/19.3.0/dbhome_1/oui/bin/runInstaller -help

                           

                            -attachHome 

                              For attaching homes to the OUI inventory.

                            -detachHome 

                              For detaching homes from the OUI inventory without deleting inventory directory inside Oracle home.

                            -ignoreSysPrereqs 

                              For ignoring the results of the system pre-requisite checks.

                           

                          (among many other parameters)

                           

                           

                          This demonstrates that the parameters should still exist.

                           

                          But it seem the switch ignoreSysPrereqs and detachHome do not exist anymore.

                          So unless the OP can provide some info what seems to be the problem, it seems the OP didn't even try.