Monday, April 30, 2018

adop phase=apply hotpatch=yes & apply_mode=downtime

An EBS 12.2.X patch is normally applied using an ADOP online patching cycle, which is the only case tested internally before 12.2 patches are released (unless documented otherwise).

We can  use Hotpatch mode only for certain patches, such as NLS and Online Help, or when it is specifically documented in the patch readme. The safe use of hotpatch mode is restricted to cases where we know in advance that the patch will not modify any existing schema or code object used by the running applications instance. If you attempt to apply an unsafe patch using hotpatch mode, the patch may fail or users may experience application failure.

In EBS release 12.2, certain kinds of patches are even less stable for use with “hotpatch” than they were in EBS 12.1. when an unsafe patch is applied via hotpatch the system will go through intermittent states of:
•invalid objects, missing code dependencies
•mismatches between code level of file system and database
•missing column data, or other data integrity problems
•out-of-date indexes and materialized view definitions
•invalid data in runtime caches

Important FAQ about HOTPATCH mode in adop
1)When you apply the patch using hotpatch in adop,  adop will still shows phase APPLY status ACTIVE after having applied successfully a patch using
 #adop phase=apply hotpatch=yes patches=123456

There were no errors in the adop patch logs. But adop status still shows:
Node Name   Node Type   Phase   Status   Started   Finished
ed-olapplin1 master PREPARE NOT APPLICABLE
APPLY ACTIVE 01-APR-18 09:18:18 +04:00 <<<< APPLY phase is still ACTIVE
FINALIZE NOT STARTED
CUTOVER NOT APPLICABLE
CLEANUP NOT STARTED

One cannot run adop phase=cutover or adop phase=cleanup because there are no Online Patching cycle that was started. The patch was applied in hotpatch=yes mode on the RUN filesystem

Solution:
a) When the patch is applied with adop hotpatch=yes mode, there are no Online Patching cycle started yet — all is on the RUN filesystem — so there are no adop commands that can be used like adop phase=cutover or adop phase=cleanup.
b) When one applies in hotpatch mode the APPLY phase will remain active until such time as run a PREPARE during the next patching cycle.
c) The APPLY phase is active because you can potentially run another hotpatch. Once one apples a hotpatch, there are no further actions required.

2)  How hotpatch on run filesystem are propagated to patch file system on next prepare phase?
Solution:
Run the prepare command when we want to start the new online patch cycle
#adop phase=prepare

At that time, adop config change detector will find that the RUN filesystem has had patches applied in hotpatch mode and will sync the PATCH filesystem as part of the prepare phase.

3) Do we have abort phase in Hotpatch mode?
Solution
The “adop phase=abort” command is only applicable to an online patching cycle, which you would have started by running adop phase=prepare. A hotpatch CANNOT be aborted with the adop phase=abort command.

If a hotpatch session fails for an approved patch (NLS, Online Help, or documented in the patch readme) you should:
a. Investigate the error and try to complete the hotpatch session by re-applying the hotpatch with restart=yes
OR
b. Apply a replacement patch with abandon=yes.
It should be possible to just abandon the hotpatch session, and then start a new ADOP online patching cycle (Make sure you are on AD/TXK Delta 6 or higher).

Downtime Mode adop R12.2
When applying patches in this mode, adop will first confirm that the application tier services are down, and will then proceed to apply the patch to the run edition of the Oracle E-Business Suite database and file system. Downtime mode patching does not use an online patching cycle. The process of applying a patch in downtime mode completes more quickly than in online mode, but at the cost of increased system downtime.

To run adop in downtime mode, you use the following command line options. In this example, patch 12345678 is applied in downtime mode:

$ adop phase=apply patches=12345678 apply_mode=downtime

It does not require the prepare phase

Important point to note with respect to downtime mode
1) Release 12.2 patches are not normally tested in downtime mode.So this mode should be used in emergency situation only
2) Downtime mode is only supported for production use where explicitly documented, or when directed by Oracle Support or Development.
3) This mode was introduced to optimize the process of upgrading to Oracle E-Business Suite Release 12.2
4) No patching cycle can be in progress. Even though adop will prevent you from applying patches in downtime mode while a patching cycle is under way, it is important to keep this in mind for planning purposes
5)To prevent massive invalidation in the database, code objects deployed to the database should not include parent objects that could cause extensive invalidation on dependent objects. If this does happen, a significant amount of time will be required for code recompilation.
6) Directories that contain code deployed to the application tier during emergency patch deployment must be registered with the custom synchronization driver, to ensure successful automatic file system synchronization by the adop synchronization process.

For any queries regarding ADOP utility email me on samiappsdba@gmail.com