9 Replies Latest reply on Sep 14, 2015 4:38 AM by Pravin Takpire

    Restored Apps Backup

    Beauty_and_dBest

      Hi ALL,

       

      ebs r12.2.4

      oel 6

       

       

      I restored my apps tier backup due to error in applying patch in our apps tier.

       

      When I restore the backup. I want to check if there are pending/hanging patching cycles in it.

       

      I run: 

       

      $ adop -status   

       

      Enter the APPS password:

      Current Patching Session ID: 9

       

      Node Name       Node Type       Phase           Status          Started                        Finished             Elapsed

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

      crp2            master          PREPARE         NOT STARTED

                                      APPLY           NOT STARTED

                                      FINALIZE        NOT STARTED

                                      CUTOVER         NOT STARTED

                                      CLEANUP         NOT STARTED

       

      File System Synchronization Used in this Patching Cycle: Full

      For more information, run ADOP Status Report by using -detail option

       

      Generating ADOP Status Report at location: /home/applcrp2/CRP2/fs_ne/EBSapps/log/status_20150913_195437/adzdshowstatus.out

      Please wait...

      Done...!

       

      adop exiting with status = 0 (Success)

       

       

      How do I abort or cancel this pending patch cycle?

       

       

      Thanks a lot,

      jc

        • 1. Re: Restored Apps Backup
          Beauty_and_dBest

          I run:

           

          $ adop  phase=cleanup

           

          Enter the APPS password:

          Enter the SYSTEM password:

          Enter the WLSADMIN password:

           

          Please wait. Validating credentials...

           

          RUN file system context file: /home/applcrp2/CRP2/fs1/inst/apps/CRP2_crp2/appl/admin/CRP2_crp2.xml

          PATCH file system context file: /home/applcrp2/CRP2/fs2/inst/apps/CRP2_crp2/appl/admin/CRP2_crp2.xml

          Execute SYSTEM command : df /home/applcrp2/CRP2/fs2

           

          Worker count determination...

           

          Validation successful. All expected nodes are listed in ADOP_VALID_NODES table.

          [EVENT]     [START 2015/09/13 20:24:43] Performing database sanity checks

          [EVENT]     [END   2015/09/13 20:24:43] Finished performing database sanity checks

            There is already a session which is incomplete. Details are:

                  Session Id            :   9

                  Prepare phase status  :   NOT COMPLETED

                  Apply phase status    :   NOT COMPLETED

                  Cutover  phase status :   NOT COMPLETED

                  Abort phase status    :   NOT COMPLETED

                  Session status        :   FAILED

            Will continue with previous session

            [START 2015/09/13 20:24:45] adzdoptl.pl run

              ADOP Session ID: 9

              Phase: cleanup

              Log file: /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/9/adop_20150913_202406.log

              [UNEXPECTED]Error: Pending session of prepare/apply/cutover exists

              [UNEXPECTED]Hint: Before trying cleanup complete the pending session

              Log file: /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/9/adop_20150913_202406.log

           

          [STATEMENT] Please run adopscanlog utility, using the command

           

          "adopscanlog -latest=yes"

           

          to get the list of the log files along with snippet of the error message corresponding to each log file.

           

          adop exiting with status = 2 (Fail)

          ===========================

           

          $ adopscanlog -latest=yes

           

          Scanning /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/9/ directory ...

           

          /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/9/adop_20150913_202406.log:

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

           

          Lines #(98-102):

          "

              [STATEMENT] SQL Output: "1".

              [UNEXPECTED]Error: Pending session of prepare/apply/cutover exists

              [UNEXPECTED]Hint: Before trying cleanup complete the pending session

              [PROCEDURE] [START 2015/09/13 20:24:46] Unlocking sessions table

           

          Lines #(99-103):

              [STATEMENT] SQL Output: "1".

              [UNEXPECTED]Error: Pending session of prepare/apply/cutover exists

              [UNEXPECTED]Hint: Before trying cleanup complete the pending session

              [PROCEDURE] [START 2015/09/13 20:24:46] Unlocking sessions table

              [STATEMENT] Unlocking ad_adop_sessions table for crp2 with wait interval of 60 seconds and number of tries 2




          How do I resolve this pending cutover process?


          Please help,


          Thanks,

          jc

          • 2. Re: Restored Apps Backup
            Chiranjeevi M A

            Restarting Adop From A Failed Session (Doc ID 1963186.1)

             

            -Chiranjeevi M A

            1 person found this helpful
            • 3. Re: Restored Apps Backup
              Pravin Takpire

              Hi,

              please do following

               

              SELECT   adop_session_id, prepare_status, apply_status, finalize_status,
                       cutover_status, cleanup_status, abort_status, status, abandon_flag,
                       node_name
                  FROM ad_adop_sessions
              ORDER BY adop_session_id;

              Where status:
              Y denotes that the phase is done
                N denotes that the phase has not been completed
                X denotes that the phase is not applicable
                R denotes that the phase is running (in progress)
                F denotes that the phase has failed
                P (is applicable only to APPLY phase) denotes at least one patch is already applied for the session id
                C denotes that the status of this ADOP session has completed

              Once you have output do following

               

              1.) Take backup of ad_adop_sessions table then update as below:

              2.)

              update ad_adop_sessions

              set PREPARE_STATUS='Y'

              where PREPARE_STATUS='R'

              AND ADOP_SESSION_ID in ('2','3','5');

               

              update ad_adop_sessions

              set FINALIZE_STATUS='Y'

              where FINALIZE_STATUS='R'

              AND ADOP_SESSION_ID in ('2');

               

              Commit;

               

              3.) Again run query to check status of adop sessions.

              4.) Perform cleanup :

              $ adop phase=cleanup cleanup_mode=full

              5) Source the RUN filesystem and run autoconfig.

              $ADMIN_SCRIPTS_HOME/adautocfg.sh

              6.) Perform fs_clone phase from RUN filesystem

              $ adop phase=fs_clone

               

              Let me know if this helps

               

              regards

              Pravin

              1 person found this helpful
              • 4. Re: Restored Apps Backup
                Beauty_and_dBest

                Thanks Pravin and ALL,

                 

                The issue is that I restored the apps tier  backup but the db tier is the same. So the pending error process left from the previous error apps is still exist pending to the db.

                 

                 

                SQL> SELECT   adop_session_id, prepare_status, apply_status, finalize_status, cutover_status, cleanup_status, abort_status, status,       abandon_flag,node_name FROM ad_adop_session ORDER BY adop_session_id;

                 

                ADOP_SESSION_ID P A F C C A S ABANDON_FLAG NODE_NAME

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

                              2 X Y N X Y X C              crp2

                              4 X Y X X Y X C              crp2

                              5 Y Y Y Y Y X C              crp2

                              7 X Y X X Y X C              crp2

                              8 X P X X N X C              crp2

                              9 N N N N N N F            9 crp2

                 

                6 rows selected.

                 

                SQL>


                SQL> update ad_adop_sessions

                set PREPARE_STATUS='Y'

                where PREPARE_STATUS='R'

                AND ADOP_SESSION_ID in ('2','3','5');

                 

                0 rows updated.

                 

                SQL> update ad_adop_sessions

                set FINALIZE_STATUS='Y'

                where FINALIZE_STATUS='R'

                AND ADOP_SESSION_ID in ('2');

                 

                0 rows updated.

                 

                Why is there no rows upated?

                • 5. Re: Restored Apps Backup
                  Pravin Takpire

                  I gave you sample script. change according to your sitiuation

                  regards

                  Pravin

                  1 person found this helpful
                  • 6. Re: Restored Apps Backup
                    Beauty_and_dBest

                    So in my situation, I will set status F to C and abandon_flag  9 to null?

                     

                    Or is it okay to update all status_flag to Y and C?

                     

                    Thanks.

                    • 7. Re: Restored Apps Backup
                      Beauty_and_dBest

                      Hi Pravin and ALL,

                       

                      I updated the ad_adop_sessions. but still the error persist

                       

                      [EVENT]     [START 2015/09/13 23:10:26] Performing database sanity checks

                      [EVENT]     [END   2015/09/13 23:10:27] Finished performing database sanity checks

                        [UNEXPECTED]Unrecoverable error occured. Exiting the current session.

                        Log file: /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/adop_20150913_230958.log

                       

                      [STATEMENT] Please run adopscanlog utility, using the command

                       

                      "adopscanlog -latest=yes"

                       

                      to get the list of the log files along with snippet of the error message corresponding to each log file.

                       

                      adop exiting with status = 2 (Fail)

                      [applcrp2@crp2 ~]$ adopscanlog -latest=yes

                      Scanning /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/adop_20150913_230958.log log file ...

                       

                      /home/applcrp2/CRP2/fs_ne/EBSapps/log/adop/adop_20150913_230958.log:

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

                       

                      Lines #(25-29):

                        [PROCEDURE] [END   2015/09/13 23:10:28] Checking active hotpatch session

                        [STATEMENT] Master Session Id: NOT DEFINED

                        [UNEXPECTED]Unrecoverable error occured. Exiting the current session.

                        [PROCEDURE] [START 2015/09/13 23:10:28] Unlocking sessions table

                        [STATEMENT] Unlocking ad_adop_sessions table for crp2 with wait interval of 60 seconds and number of tries 2

                       

                       

                      Please help..

                       

                      Thanks.

                      • 8. Re: Restored Apps Backup
                        Beauty_and_dBest

                        Hi ALL,

                         

                        Will my database be cleared its table adop issues if I run again post-clone process over it?

                         

                        $ perl adcfgclone.pl dbTier

                         

                        Or

                         

                        Is it okay to delete the contents of ad_adop_sessions to clear up any errors of patching?

                         

                        Master Session Id: NOT DEFINED


                        How do I define the master session? Does the ad_adop_sessions_table must have always one row?

                         

                         

                        Thanks all.

                        • 9. Re: Restored Apps Backup
                          Pravin Takpire

                          I think we are discussing the same in another session. Please close this thread

                          regards

                          Pravin

                          1 person found this helpful