Monday, April 30, 2018

adop phase=apply hotpatch=yes

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).

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