Contact Us!!!

contact@unionsystechnologies.com

Wednesday, 31 December 2014

Adop utility in oracle apps R12.2

adop (Online Patching) Patching while End Users are accessing Applications. EBS R12.2 onwards all patching operations are online (system remains available during patching) unlike previous versions where system was unavailable for users during patching (Maintenance Mode).
Online Patching uses Edition Based Redefinition (EBR) which provides two copies of database objects (schema) pre and post patch.
A: Run Edition of database objects: used by online users and is not changed by patching
B: Patch Edition of database objects: used by patching tool and do not affect the running application

Note: There is third edition called Old Edition.
Previous Run Edition is marked as Old Edition. During full Cleanup Operation, adop removes Old Edition.

Oracle provides this online patching system by using two Apps tier file systems named fs1 and fs2 in Application tier, by using edition based redefinition feature of 11gR2 RDBMS in Database Tier.

Phases in adop
Normally, we have 5 phases when applying EBS patch. These phases are prepare, apply, finalize, cutover and cleanup.

Phases must be specified in the order they run, which is the order listed.
Prepareà Prepare the instance for online patching.
ApplyàApply patches to the patch edition.
FinalizeàReady the instance for cutover.
CutoveràPromote the patch edition to become the new run edition.
CleanupàDrop obsolete objects and seed data from old editions.

We start with prepare for synchronizing the patch file system for Applications and the patch version for db tier. Then we continue with apply phase. This phase is actual phase that the patch operations are done. adop uses patch file system to upload new apps tier files and uses the patch edition of the database to take db actions.  After apply we continue with adop=finalize. In this phase, application and database specific actions such as compilation takes place.


So those 3 phases require no downtime, but the next phase which is called cutover needs a little downtime. It is automatic though. In cutover phase, adop switches the patched file system and db edition with the current/run file system and db edition. That's why Application Tier components are restarted in this phase. Downtime is coming from restarting the components.
The last phase is cleanup phase. It is self explanatory. In this phase ADOP starts cleaning up the old editions.

Examples of using adop:

To prepare instance for patching
$adop phase=prepare                      

To prepare instance for patching, specify patches, request merge, and apply with 4 workers.
$adop phase=prepare, apply patches=12345, 67890 merge=yes workers=4

To prepare instance for patching and apply patches interactively
$adop phase=prepare, apply

Running all phases in single command:
$adop phase=prepare,apply,finalize,cutover,cleanup patches=patch1,patch2

To apply patches with list of patches in the input_file.
$adop phase=apply input_file=adopsession20120702.txt

To fully automated patching with all parameters taken from input_file:
$adop input_file=adopsessions20120702.txt

To apply patches in hotpatch mode
$adop phase=apply input_file=adopsession20120702.txt hotpatch=yes

Parameters (all are optional):
$adop -status    (Status of the last or specific adop session)
$adop -help      (Provides usage details for the adop command)
cleanup_mode (optional cleanup processing control)
loglevel         (Takes values 'statement', 'exception', 'error', 'unexpected' [default: statement])
defaultsfile        (Path to custom adop defaults file)
patchtop             (Path to the user-specified directory where patches are unzipped)
mtrestart           (Takes values 'yes' or 'no' [default: yes]. Specifies whether to restart
      the middle tier services at the end of cutover)




Parameters relevant for the apply phase
workers      (Specify number of parallel workers. If not specified, will be calculated    automatically)
merge          (Merge patches before applying. Takes values 'yes' or 'no' [default: yes])
NOTE: This replaces AD Merge Patch

                                 abandon
                                 Abandon Used to specify whether to restart the previous run of adop. 
$adop phase=apply patches=10721639 abandon=yes

restart
Used to specify whether to restart the previous run of ADOP. May be useful if the previous action had an error.
$adop phase=apply patches=10721639 restart=yes

Note: If there was an error in the previous run, and 'abandon' is not set to 'yes', the same parameters will be re-used that were used in the failed run.
If you give a value for the 'restart' parameter, it cannot be the same as the value given for this parameter.

hotpatch
Applies patches in hotpatch mode. Takes values 'yes' or ‘no’ [default: no].
NOTE: This does not require or allow any other phases to be specified except 'apply'.