ADOP – Applications DBA Online Patching Tool
Oracle E-Business R12.2 introduced a new patching mechanism that allow the application of patches while your environment is up and running which is called as Online patch. ADOP Patching replaces adpatch in 12.2.
The base for the online patching concept came into picture with 11GR2 database version, where there is a concept called "Edition Based Redefinition", database online patching is based on it.
Now it is possible to apply even upgrade patches in Online Patching mode minimizing downtime to very low.
Please note upgrade to 12.2 is not possible via online patching from lower versions. Online Patching in 12.2 is done using adop utility (No more adpatch), but this utility calls internally adpatch to do the patching.
All the patches need to be applied using adop only, other options/methods are not supported. But we can apply the patches in hot patch mode using adop, but in this method, the online patching concept will not come into picture, it is a traditional way of applying patch directly on the run file system and run edition of the database when applications and DB is running.
On database side, online patching database objects also maintain two copies to support this method
i.e.
run file system and run edition of DB, patch file system and patch edition of DB.
On applications side, It contains two set of file systems patch and run file system.
Run is where actually applications is running from and patch is used for patching the applications when it is running. In database we have edition based concept, where we contain patch edition and run edition.
The online patching cycle consists of number of phases:
1) Prepare -> Prepare the instance for patch application.
2) Apply –> Apply patches (to the patch edition).
3) Finalize –> Ready the instance for cutover.
4) Cutover –>Make the patch edition the new run edition.
5) Cleanup –> Drop obsolete objects and data from old editions
6) fs_clone –> Synchronize RUN & Patch file systems
7) Abort –> Terminate the patching activity
1) Prepare Phase :
In this phase, patch edition and run editions are synchronized in incremental
synchronizations of files changed in the run file system.
Syntax: $ adop phase=prepare
2) apply phase :
In this phase, patches are applied to patch edition in the database and patch
file system in the applications.
adpatch is called internally by adop to apply the patches.
Production application is not affected by these changes, and multiple patches
can be applied.
Syntax: $ adop phase=apply
3) finalize phase :
In this phase, performs all the activities which can be done when applications
is up & running like compile invalid objects.
Syntax: $ adop phase=finalize
4) cutover phase :
This is the stage where actual changes reflects and downtime is required for
this phase.
Users are logged off during this stage. Patch file system is promoted to be the
run file system.Patch database edition is promoted to the run database
edition.
Syntax: $ adop phase=cutover
5) cleanup phase :
This phase happens once users online on the system.There is no cleanup on
the file system , only it happens on the database where it deletes the code
objects from old editions of the database where patching happened.
Syntax: $ adop phase=cleanup
6) fs_clone phase :
Synchronize the file system, which copy the new run edition code and
configuration to the patch file system.
3 | P a g e
Syntax: $ adop phase=fs_clone
7) Abort phase :
This phase is used only if the online patching cycle needs to be
terminated before completion:
$ adop phase=abort
Please Note: The abort phase can only be run after the prepare phase and before completion of the cutover phase. After the cutover phase completes, it is no longer possible to abort the online patching cycle.
Steps to apply patch on R12.2 using ADOP in Interactive mode:
1) Download and unzip the patch, before proceeding with patching activity
please go through the patch readme file.
2) Source the environment.
$ source <run APPL_TOP path>/APPS<CONTEXT_NAME>.env or better we
should run EBSapps.env environment file (created under Install BASE
directory) with ‘RUN’ as argument. It will set environment and display
filesystem information.
. ./EBSapps.env RUN
3) Check the status of adop using below command.
$ adop -status
4) Prepare the system for patching.
$ adop phase=prepare
5) Apply the patch to patch edition.
$ adop phase=apply patches=<patch number>
6) After patch has been applied successfully, complete the below patch cycles.
$ adop phase=finalize
$ adop phase=cutover
$ adop phase=cleanup
7) Synchronize the file system, which copy the new run edition code and
configuration to the patch file system.
$ adop phase=fs_clone
Patch Log Files:-
To review the log files after any patching operation. The adop log files are located on
the non-editioned file system (fs_ne).
$NE_BASE/EBSapps/log/adop//__//log
ADOP patching cycle in Non-Interactive Mode :
During apply phase, non-interactive patching is a way to save time by avoiding some
of the prompts.
We can apply patches in non-interactive way by using a defaults file that contains
much of the information that we supplly at the adop prompts and by creating
another file known as input file. When we run adop, we need to specify the name of
the input file. The location of the defaults file will also need to be included in the
input file.
$ adop phase=apply input_file=<input_file.txt>
Location of Default file on both the run APPL_TOP and patch APPL_TOP is:
$APPL_TOP/admin/<SID>_patch/adalldefaults.txt
In case this file gets corrupted or lost, we can run AutoConfig and it will
automatically instantiate a new copy.
Please Note: In R12.2, we don’t need to create the defaults file. The file is already
created by oracle process. However we need to create one ‘input file’ to use with
adop.
The input_file contents should include the following required parameters:
patches=<patch number>
workers=<number of workers>
patchtop=<directory where patches are staged>
defaultsfile=<defaults file on patch APPL TOP>
To apply patch in ‘HOTPATCH’ mode
During apply phase, we just need to specify “options=hotpatch”
adop phase=apply options=hotpatch
we can see couple of other examples commands by typing on Unix command
prompt “adop –examples”.
Important Environment Variables in R12.2
$ echo $FILE_EDITION
<shows which file edition you are using, run or patch>
$ echo $RUN_BASE
<shows absolute path to run file system>
$ echo $PATCH_BASE
<shows absolute path to patch file system>
$ echo $NE_BASE
<shows absolute path to non-edition file system>
$ echo $APPL_TOP_NE
<non-editioned appl_top path. Equivalent to $NE_BASE/EBSapps/appl>
$ echo $LOG_HOME
<Application Instance Specific Log Directory>
$ echo $ADOP_LOG_HOME
< ADOP Log Directory i.e. $NE_BASE/EBSapps/log/adop>
Oracle E-Business R12.2 introduced a new patching mechanism that allow the application of patches while your environment is up and running which is called as Online patch. ADOP Patching replaces adpatch in 12.2.
The base for the online patching concept came into picture with 11GR2 database version, where there is a concept called "Edition Based Redefinition", database online patching is based on it.
Now it is possible to apply even upgrade patches in Online Patching mode minimizing downtime to very low.
Please note upgrade to 12.2 is not possible via online patching from lower versions. Online Patching in 12.2 is done using adop utility (No more adpatch), but this utility calls internally adpatch to do the patching.
All the patches need to be applied using adop only, other options/methods are not supported. But we can apply the patches in hot patch mode using adop, but in this method, the online patching concept will not come into picture, it is a traditional way of applying patch directly on the run file system and run edition of the database when applications and DB is running.
On database side, online patching database objects also maintain two copies to support this method
i.e.
run file system and run edition of DB, patch file system and patch edition of DB.
On applications side, It contains two set of file systems patch and run file system.
Run is where actually applications is running from and patch is used for patching the applications when it is running. In database we have edition based concept, where we contain patch edition and run edition.
The online patching cycle consists of number of phases:
1) Prepare -> Prepare the instance for patch application.
2) Apply –> Apply patches (to the patch edition).
3) Finalize –> Ready the instance for cutover.
4) Cutover –>Make the patch edition the new run edition.
5) Cleanup –> Drop obsolete objects and data from old editions
6) fs_clone –> Synchronize RUN & Patch file systems
7) Abort –> Terminate the patching activity
1) Prepare Phase :
In this phase, patch edition and run editions are synchronized in incremental
synchronizations of files changed in the run file system.
Syntax: $ adop phase=prepare
2) apply phase :
In this phase, patches are applied to patch edition in the database and patch
file system in the applications.
adpatch is called internally by adop to apply the patches.
Production application is not affected by these changes, and multiple patches
can be applied.
Syntax: $ adop phase=apply
3) finalize phase :
In this phase, performs all the activities which can be done when applications
is up & running like compile invalid objects.
Syntax: $ adop phase=finalize
4) cutover phase :
This is the stage where actual changes reflects and downtime is required for
this phase.
Users are logged off during this stage. Patch file system is promoted to be the
run file system.Patch database edition is promoted to the run database
edition.
Syntax: $ adop phase=cutover
5) cleanup phase :
This phase happens once users online on the system.There is no cleanup on
the file system , only it happens on the database where it deletes the code
objects from old editions of the database where patching happened.
Syntax: $ adop phase=cleanup
6) fs_clone phase :
Synchronize the file system, which copy the new run edition code and
configuration to the patch file system.
3 | P a g e
Syntax: $ adop phase=fs_clone
7) Abort phase :
This phase is used only if the online patching cycle needs to be
terminated before completion:
$ adop phase=abort
Please Note: The abort phase can only be run after the prepare phase and before completion of the cutover phase. After the cutover phase completes, it is no longer possible to abort the online patching cycle.
Steps to apply patch on R12.2 using ADOP in Interactive mode:
1) Download and unzip the patch, before proceeding with patching activity
please go through the patch readme file.
2) Source the environment.
$ source <run APPL_TOP path>/APPS<CONTEXT_NAME>.env or better we
should run EBSapps.env environment file (created under Install BASE
directory) with ‘RUN’ as argument. It will set environment and display
filesystem information.
. ./EBSapps.env RUN
3) Check the status of adop using below command.
$ adop -status
4) Prepare the system for patching.
$ adop phase=prepare
5) Apply the patch to patch edition.
$ adop phase=apply patches=<patch number>
6) After patch has been applied successfully, complete the below patch cycles.
$ adop phase=finalize
$ adop phase=cutover
$ adop phase=cleanup
7) Synchronize the file system, which copy the new run edition code and
configuration to the patch file system.
$ adop phase=fs_clone
Patch Log Files:-
To review the log files after any patching operation. The adop log files are located on
the non-editioned file system (fs_ne).
$NE_BASE/EBSapps/log/adop//__//log
ADOP patching cycle in Non-Interactive Mode :
During apply phase, non-interactive patching is a way to save time by avoiding some
of the prompts.
We can apply patches in non-interactive way by using a defaults file that contains
much of the information that we supplly at the adop prompts and by creating
another file known as input file. When we run adop, we need to specify the name of
the input file. The location of the defaults file will also need to be included in the
input file.
$ adop phase=apply input_file=<input_file.txt>
Location of Default file on both the run APPL_TOP and patch APPL_TOP is:
$APPL_TOP/admin/<SID>_patch/adalldefaults.txt
In case this file gets corrupted or lost, we can run AutoConfig and it will
automatically instantiate a new copy.
Please Note: In R12.2, we don’t need to create the defaults file. The file is already
created by oracle process. However we need to create one ‘input file’ to use with
adop.
The input_file contents should include the following required parameters:
patches=<patch number>
workers=<number of workers>
patchtop=<directory where patches are staged>
defaultsfile=<defaults file on patch APPL TOP>
To apply patch in ‘HOTPATCH’ mode
During apply phase, we just need to specify “options=hotpatch”
adop phase=apply options=hotpatch
we can see couple of other examples commands by typing on Unix command
prompt “adop –examples”.
Important Environment Variables in R12.2
$ echo $FILE_EDITION
<shows which file edition you are using, run or patch>
$ echo $RUN_BASE
<shows absolute path to run file system>
$ echo $PATCH_BASE
<shows absolute path to patch file system>
$ echo $NE_BASE
<shows absolute path to non-edition file system>
$ echo $APPL_TOP_NE
<non-editioned appl_top path. Equivalent to $NE_BASE/EBSapps/appl>
$ echo $LOG_HOME
<Application Instance Specific Log Directory>
$ echo $ADOP_LOG_HOME
< ADOP Log Directory i.e. $NE_BASE/EBSapps/log/adop>
No comments:
Post a Comment