This discussion is archived
14 Replies Latest reply: Oct 9, 2013 1:22 PM by Srini Chavali-Oracle RSS

Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?

GTS (DBA) Journeyer
Currently Being Moderated

Hello everyone ;

 

Greeting !  Good morning to all;

 

If the upgrade process fails ,  should  i restore  old  oraInventory  directory ?

Already i  backed up   $ORACLE_HOME, oraInventory and  consistent copy of datafiles, controlfiles and redo log files.


I have restored  $ORACLE_HOME and  consistent copy of datafiles, controlfiles and redo log files.  

Again , should  i restore (old backed up oraInventory ) directory ?


Thanks in advance ..



  • 1. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Pl details what you mean by "upgrade process fails". Typically, you would only need to restore the database and re-run the upgrade. There should be no reason to restore the previous ORACLE_HOME - if you did, you will have to restore the oraInventory directory also, then re-apply the 10.2.0.x patch, then re-do the upgrade

     

    HTH
    Srini

  • 3. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    GTS (DBA) Journeyer
    Currently Being Moderated

    @ Srini_Chavali

     

    I have upgraded my db to 10.2.0.4.0 but i cannot see  10.2.0.4.0 path anywhere

    so i think , patch may failed.

     

    $ echo $ORACLE_HOME

    /u01/app/oracle/product/10.2.0/db_1

     

    [oracle@oracle ~]$ echo $LD_LIBRARY_PATH

    /u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib

     

    SQL> select * from v$version;

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod

    PL/SQL Release 10.2.0.4.0 - Production

    CORE    10.2.0.4.0      Production

    TNS for Linux: Version 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

     

    SQL> select count(*) from dba_objects where status='INVALID';

      COUNT(*)

        0

  • 4. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Pl provide the steps you performed for the upgrade - where do you expect to see 10.2.0.4 in the PATH ?

     

    SQL> select * from v$version;

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod

    PL/SQL Release 10.2.0.4.0 - Production

    CORE    10.2.0.4.0      Production

    TNS for Linux: Version 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

    This indicates to me that the upgrade was successful - are there any errors in the upgrade log ?

     

    HTH
    Srini

  • 5. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    GTS (DBA) Journeyer
    Currently Being Moderated


    Pl provide the steps you performed for the upgrade -


    $ emctl stop   dbconsole

    TZ  set to  Asia/Calcutta

    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

    Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

    http://oel.linuxserver:1158/em/console/aboutApplication

    Stopping Oracle Enterprise Manager 10g Database Control ...

    ...  Stopped.

     

    $  isqlplusctl  stop

    iSQL*Plus 10.2.0.1.0

    Copyright (c) 2003, 2005, Oracle.  All rights reserved.

    Stopping iSQL*Plus ...

    iSQL*Plus stopped.

     

    $  lsnrctl  stop

    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-APR-2013 04:45:33

    Copyright (c) 1991, 2005, Oracle.  All rights reserved.

    Connecting to

    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel.linuxserver)(PORT=1521)))

    The command completed successfully

     

    SQL> SHOW USER;

    USER is "SYS"

    SQL> shut immediate;

    Database closed.

    Database dismounted.

    ORACLE instance shut down.

     

     

    Take a  backup  of  $ORACLEHOME and   database and oraInventory

    ---------------------------------------------------------------


    $  cd /u01/app/oracle/oradata/

    $  tar -czf   /home/oracle/orclbackup.tar.gz   orcl

     

    $  cd /u01/app/oracle/product/10.2.0/

    $  tar  -czf   /home/oracle/orclhomebackup.tar.gz    db_1

     

    $  cd  /u01/app/oracle/

    $  tar -czf  /home/oracle/oraInv_backup.tar.gz    oraInventory/

     


    $  ls  /home/oracle/

    Desktop   oraInv_backup.tar.gz   orclbackup.tar.gz   orclhomebackup.tar.gz

     

    #  xhost +  SI:localuser:oracle

    # su - oracle

    ......

     

    $  unzip  p6810189_10204_Linux-x86.zip

    $  cd  Disk1

    $  ./runInstaller


    WELCOME SCREEN APPREAD

    .

    .

    [ Trimmed]

    .

    Finally executed root.sh script as '# user'

    Then i have used  DBUA to upgrade my database ..

     

    SQL> select comp_name , version , status from dba_registry;

     

    COMP_NAME                             VERSION           STATUS

    ------------------------------       -----------      ----------

    Oracle Database Catalog Views         10.2.0.4.0       VALID

    Oracle Database Packages and Types    10.2.0.4.0       VALID

    Oracle Workspace Manager              10.2.0.4.3       VALID

    JServer JAVA Virtual Machine          10.2.0.4.0       VALID

    Oracle XDK                            10.2.0.4.0       VALID

    Oracle Database Java Packages         10.2.0.4.0       VALID

    Oracle Expression Filter              10.2.0.4.0       VALID

    Oracle Data Mining                    10.2.0.4.0       VALID

    Oracle Text                           10.2.0.4.0       VALID

    Oracle XML Database                   10.2.0.4.0       VALID

    Oracle Rule Manager                   10.2.0.4.0       VALID

    Oracle interMedia                     10.2.0.4.0       VALID

    OLAP Analytic Workspace               10.2.0.4.0       VALID

    Oracle OLAP API                       10.2.0.4.0       VALID

    OLAP Catalog                          10.2.0.4.0       VALID

    Spatial                               10.2.0.4.0       VALID

    Oracle Enterprise Manager             10.2.0.4.0       VALID

     

    17 rows selected.


     

    @ where do you expect to see 10.2.0.4 in the PATH ?

       $ echo $ORACLE_HOME

       /u01/app/oracle/product/10.2.0/db_1


      $ echo $LD_LIBRARY_PATH

      /u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib


      Where  can i see my 10.2.0.4.0  ORACLE_HOME ?


      Thanks srini ..

     

     

     


  • 6. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Your steps are correct and your upgrade is successful - you will not see 10.2.0.4 in the PATH anywhere (just like how you do not see 10.2.0.1 in the PATH)

     

    HTH
    Srini

  • 7. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    GTS (DBA) Journeyer
    Currently Being Moderated

    @ Srini;

    Thanks srini ..

    Suppose the upgrade process fails, When applying patch ,  apart from oracle

    1) Are there any background process at OS level , patching to become died ?   if so , ( please provide little deep)

    2) Even we apply patchset (10.2.0.4) on  existing oracle_home (10.2.0.1), - cannot  maintain separate $ORACLE_HOME by oracle ? - i mean ,

    seperate $ORACLE_HOME  for 10.2.0.1.0

    seperate $ORACLE_HOME  for 10.2.0.4.0

    Thanks in advance ..

  • 8. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    There are two pieces to your upgrade -

     

    1. Installing the 10.2.0.4 patch on top of the 10.2.0.1 binaries - you need to back up the $ORACLE_HOME and oraInventory directories before you apply the patch - if the binary upgrade fails for any reason, you can restore the ORACLE_HOME and oraInventory from backups and re-apply the 10.2.0.4 binaries.

     

    2. If the above step is successful, then you need to upgrade the database using DBUA. Again, before you start the upgrade, you backup the database. If there are any issues during this portion, you simply restore the database from backups and perform the upgrade again.

     

    You can certainly use two separate HOMEs if you want. In this case the first step would be to clone the existing 10.2.0.1 HOME to a new 10.2.0.1 HOME - see Cloning an Oracle Home

     

    After the clone is completed, then use the two steps above on the newly created HOME

     

    HTH
    Srini

  • 9. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    GTS (DBA) Journeyer
    Currently Being Moderated

    @ srini ..

     

    Well answered. Thanks .. but  even i need couple of answer for following queries ..

     

    In my previous reply , i asked 1st question (below) .. Suppose the upgrade process fails, When applying patch ,  apart from oracle ,

    1) Are there any background process at OS level affecting patch to become died ?  

    After patch on my database on 10.2.0.1 ,

    2) Should we need (10.2.0.1.0 $ORACLE_HOME) for our current database ? - Is  this really necessary ??

    3) Suppose if i remove oraInventory , Deletion of this file - does it affect my database ?

    FYI :

    I have started new thread about my upgradation summary details - which was shown by DBUA.

    I have some doubt on this.. Please see my new thread.

    Thanks

  • 10. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    In my previous reply , i asked 1st question (below) .. Suppose the upgrade process fails, When applying patch ,  apart from oracle ,

    1) Are there any background process at OS level affecting patch to become died ?  

    When applying the 10.2.0.4 patch to the 10.2.0.1 HOME, all databases running out of the 10.2.0.1 HOME need to be shutdown (pl see the README of the 10.2.0.4 patch) - so your question above does not make sense. What exactly do you mean by "upgrade process fails ... apart from oracle" ?

     

    After patch on my database on 10.2.0.1 ,

    2) Should we need (10.2.0.1.0 $ORACLE_HOME) for our current database ? - Is  this really necessary ??

    3) Suppose if i remove oraInventory , Deletion of this file - does it affect my database ?

    It depends - if there are multiple databases running out of the 10.2.0.1 HOME and you want to only upgrade some of those database to 10.2.0.4, then you will have to create/clone a new 10.2.0.1 HOME, apply the 10.2.0.4 patch to the new HOME, and upgrade needed databases to 10.2.0.4 and use the new HOME for them.

     

    If you have only one database in the 10.2.0.1 HOME, or are wanting to upgrade all databases in the 10.2.0.1 HOME to 10.2.0.4, then you do not require a separate 10.2.0.1 HOME - shutdown all of the databases. apply the 10.2.0.4 patch,  upgrade all of the databases, bring up the upgraded databases.

     

    You should not delete oraInventory - it is not required for normal running of the database, but is required for patches and upgrades

     

    HTH
    Srini

  • 11. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    GTS (DBA) Journeyer
    Currently Being Moderated

    @ Srini ;

     

    I got answer  for 2nd and 3rd questions .. Well ,i am clear ..

     

    some one told me , some background process at OS level affecting patch to become died .

         so that i am asking  to understand clearly . i dont know about this things.

          Thanks ..

  • 12. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Pl ask the person whom you talked to clarify what he/she means :-)

     

    Srini

  • 13. Re: Restore the database back to 10.2.0.1 (should i restore old backed up  oraInventory ) ?
    GTS (DBA) Journeyer
    Currently Being Moderated

    @ Srin


    Suppose if i remove oraInventory , Deletion of this file - does it affect my database ?

    Your Answer :    You should not delete oraInventory - it is not required for normal running of the database, but is required for patches and upgrades

     

    After patching on my database ,  In oraInventory , can i see  any information related to applied patch details  ?

    I was searching into oraInventory  directory. i cannot find any information related to 10.2.0.4.0.

          In oraInventory , if possible to see(current db version or  patching information) , please say where can i see that ?

     

    Thanks ..

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points