What Happens in ADOP apply Phase

Apply Phase is executed in PATCH Filesystem
During Apply phase of an ADOP cycle, adop execute patch drivers to update Patch Edition
We can have multiple apply phases in an adop cycle, Multiple patches including customizations can be installed in this phase.


The production application is online and accessible to users. RUN filesystem is not affected by the changes.
Patches are applied to the copy (Patch Edition)
 Changes are made in the isolation of an Edition 
The running application is unaffected by these changes




workers 
specifies number of parallel workers, automatically calculated if not specified  
abandon 
abandons a patching session (if set to “yes”) and must have an opposite specification to that of parameter “restart”.
restart
 restarts a patching session (if set to “yes”) and must have an opposite specification to that of parameter “abandon”.

Example: $ adop phase=apply workers=4 abandon=yes restart=no patches=1234567,8909228






For more adop options and their usage Click here

Autopatch error: The worker should not have status ‘Running’ or ‘Restarted’ at this point

If you are restarting a failed patch session in oracle applications, sometimes you may encounter the error


AutoPatch error:
The worker should not have status ‘Running’ or ‘Restarted’ at this point.


Telling workers to quit…


All workers have quit.


Connecting to APPS……Connected successfully.


AutoPatch error:


Error running SQL and EXEC commands in parallel


Cause:


1. adpatch or adop process was killed from OS level while patch is being applied


2. Database shutdown or terminated






Solution:


Using adctrl utility, use option 4 to change the worker status to Failed




Review the messages above, then press [Return] to continue.


                    AD Controller Menu
     —————————————————


     1.    Show worker status


     2.    Tell worker to restart a failed job


     3.    Tell worker to quit


     4.    Tell manager that a worker failed its job


     5.    Tell manager that a worker acknowledges quit


     6.    Restart a worker on the current machine


     7.    Exit




Enter your choice [1] : 4


Enter the worker number(s)/range(s) or ‘all’ for all workers,
or press [Return] to go back to the menu : all


Status changed to ‘Failed’ for worker 1.
Status changed to ‘Failed’ for worker 2.
Status changed to ‘Failed’ for worker 3.
Status changed to ‘Failed’ for worker 4.
Review the messages above, then press [Return] to continue.






select option “1. Show Worker Status” , The worker status will be “Failed” 


Now select option 2. “2. Tell worker to restart a failed job” 




Enter the worker number(s)/range(s) or ‘all’ for all workers,
or press [Return] to go back to the menu : all


Status changed to ‘Fixed, restart’ for worker 1.
Status changed to ‘Fixed, restart’ for worker 2.
Status changed to ‘Fixed, restart’ for worker 3.
Status changed to ‘Fixed, restart’ for worker 4.




Restart adpatch 


In 11i, R12.1.X version of oracle applications


when applying patch using adpatch , Select option Yes When it prompts for


‘Do you wish to Continue with Previous adpatch Session’


In R12.2.x, Use restart and abandon parameters




adop phase=apply patches=123456 restart=yes abandon=no 


To restart the patch session from where it failed.

ADOP Patching Fails with aipspv(): Error setting up PDI list for upgrade

While Applying patch on a 12.2.5 environment using online patch cycle in adop, Autopatch Failed with error


AutoPatch error:
Invalid password for schema “CUST1” (oracle_id = 20087)


AutoPatch error:
Failed getting PDI list for product ‘xx1’


AutoPatch error:
aipspv(): Error setting up PDI list for upgrade


Root Cause
=========


Password for Application schema is not changed using FNDCPASS


Solution
========


1.Change the password of custom application with FNDCPASS 


Syntax for FNDCPASS


$ FNDCPASS apps/<PASSWORD> 0 Y system/<PASSWORD> ORACLE CUST1 <NEWPASSWORD>
Log filename : L********.log




Report filename : O*****.out


2. Verify the password change is successful


$ cat L*******.log
+—————————————————————————+
Application Object Library: Version : 12.2


Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.


FNDCPASS:
+—————————————————————————+


Current system time is 10-MAR-2016 23:21:30


+—————————————————————————+


Working…
Password is changed successfully for user BOLINF.
FNDCPASS completed successfully.


+—————————————————————————+
Concurrent request completed successfully
Current system time is 10-MAR-2016 23:21:30


+—————————————————————————+






Please Note, In 12.2.x Environments FNDCPASS must be executed on RUN Filesystem.


3. Restart the online patching cycle 


While restarting adop apply phase after a previously failed session, use options abandon and restart




adop phase=apply patches=123456 restart=yes abandon=no 


[Use this command if you wish to continue the previous patch session from the step where it failed]


adop phase=apply patches=123456 restart=no abandon=yes




[Use this command if you wish to start a fresh patch session]








If changing password using FNDCPASS does not work, analyse further details about database user and application user.


Check if the database user and application user are defined correctly using the sql queries below


SQL> select ORACLE_ID from FND_ORACLE_USERID where oracle_username like ‘%CUST1%’;


 ORACLE_ID
———-
     2008


SQL> select application_id from fnd_application where application_short_name = ‘XX1’;


APPLICATION_ID
————–
         2003


SQL> select * from fnd_product_installations where oracle_id=2008;




If the user details are not correct from the output of above sql, Please correct them.

What Happens During ADOP Finalize Phase

The Finalize phase of adop cycle,takes care of below online activities


1.Perform the final operations that can be executed while the Application is online
2.Compile invalid objects
3.Generate derived objects
4.Pre-compute DDL to be run at Cutover


After Finalize phase, we can pause the adop online patching cycle until the appropriate downtime window is available.


Syntax for running finalize phase 


$ adop phase=finalize
$ adop phase=finalize finalize_mode=quick == This is Default Mode
$ adop phase=finalize finalize_mode=full    


Finalize can be run in 2 modes: “QUICK” or “FULL”
FULL gathers database dictionary statistics (not transaction tables statistics)
QUICK skips gathering database dictionary statistics.


Downtime Mode feature in ADOP Patching


Downtime mode is introduced in E-Business Suite Release 12.2, to minimize the duration of 12.2 upgrade process.This feature is available from AD.Delta.5 Release Update Pack.

Before applying patch in downtime mode, all Application services must be shutdown.Downtime mode does not use online patching cycle phases,hence it applied patches quickly compared to online patching. However, EBS application will be down for longer time in downtime mode.Make sure that no adop cycle is in progress while applying patch in downtime mode, Otherwise it will give error.

To apply patch in downtime mode. Follow the below steps

1. Shut down Application Services

2. Apply patch using the below command

 $ adop phase=apply patches=<patch_number> apply_mode=downtime

3. Startup Application Services


Following Scenarios require to apply patch in downtime mode in R12.2

1. All Patching that is part of 12.2 upgrade process. Once the upgrade is complete and users are online, all subsequent patching on a production system should use online mode, unless stated in patch ReadMe.

2. Single-node development or test environments, where production support and high availability are not required.

Limitations of downtime mode

1. We cannot test the patch application prior to cutover as in online patching cycle.
2. We cannot rollback patch applied using downtime mode.
3. Downtime mode is not applicable for Multi-node environments


What Happens during adop prepare Phase?


The online patching cycle in R12.2  which uses ADOP  utility applies patch in 5 Phases
The phases are

PREPARE
APPLY
FINALIZE
CUTOVER
CLEANUP

PREPARE PHASE:

1)Prepares the Filesystem

During Prepare phase,RUN and PATCH filesystems are synchronized.By Default, Synchronization is done in incremental mode.
Full Synchronization is also available, if needed.


This is to ensure that all files on PATCH filesystem are exact copy of files on RUN Filesystem.

2)Prepares the Database

A new patch edition is created in the database.All code objects in the Patch Edition begin as pointers to code objects in the Run Edition
Objects are only “Actualized” into the Patch Edition when a new revision of the code is applied. Storage objects such as tables are not copied.
This ensures efficient use of space.

Use the below Command to start prepare

$ adop phase=prepare

Prepare phase runs Cleanup from previous cycle if it wasn’t run explicitly. To minimise the execution time of prepare phase, we need to run cleanup  explicitly.
Also, submits Online Patching concurrent program (ADZDPATCH),o prevent online patching incompatible concurrent programs from executing.

Changing APPS Password in R12.2

APPS Password in R12.2 can be changed either using AFPASSWD or FNDCPASSS utility. AFPASSWD is an enhancement to FNDCPASS.


To change APPS password , follow the below steps

1. Shut down MT Services

2.Use the syntax below to change password.

$AFPASSWD -c apps -s APPLSYS

Sample Output: Enter the ORACLE password of Application Object Library ‘APPSUSER’:
Connected successfully to APPS.
Enter the password for your ‘SYSTEM’ ORACLE schema:
Connected successfully to SYSTEM.  Working…
Enter new password for user:
Verify new password for user:
Working…
AFPASSWD completed successfully.

Note that, to change APPS password we need to give APPLSYS username in AFPASSWD syntax.
APPLSYS and APPS share the same password. Changing APPLSYS password using AFPASSWD utility changes APPS Password also.

3. After the password is changed, start only adminserver on RUN filesystem  using the script adadminsrvctl.sh.

Update the “apps” password in WLS Datasource as follows:
Log in to WLS Administration Console.
Click Lock & Edit in Change Center.
In the Domain Structure tree, expand Services, then select Data Sources.
On the “Summary of JDBC Data Sources” page, select EBSDataSource.
On the “Settings for EBSDataSource” page, select the Connection Pool tab.
Enter the new password in the “Password” field.
Enter the new password in the “Confirm Password” field.
Click Save.
Click Activate Changes in Change Center.

4. Start all the application services using adstrtal.sh

Online Patching Steps in R12.2 (ADOP)

Basics of online Patching in R12.2

Online patching uses the latest feature of the Oracle database 11gR2 which is called “Edition Based
Redefinition” and also uses multiple file systems on the application side.
While online Patching with adop is in progress, users can use the application and database on RUN Filesystem.
Patch is applied on the alternate filesystem, which is an exact copy of RUN filesystem,called PATCH filesystem.
Users are switched to PATCH filesystem after the patching is complete.
Application is only offline during the Cutover phase.Downtime is now redefined as Cutover.

ADOP Patching Steps
1. Download the patch and unzip in PATCH_TOP directory.

2. Prepare the system for Patching

Source the RUN environment file
cd /test12/applmgr
. ./EBSapps.env RUN

adop phase=prepare

3. Source the PATCH Environment & apply patches:
cd /test12/applmgr
. ./EBSapps.env PATCH
==> Apply patch 19697098

Patch Location: /test12/applmgr/patches
adop phase=apply patchtop=/test12/applmgr/patches  patches=19697098

4..Run finalize.
adop phase=finalize

5. Cutover Phase

    $ adop phase=cutover
   
6. Cleanup old editions

    $ adop phase=cleanup
   
7. Synchronize RUN and PATCH filesystems.Start Fs_clone

adop phase=fs_clone