Tuesday 6 October 2015

Adpatch Preserving Patch state

Preserving Patch state
 
Ever wondered how to preserve a patching status

Overview :
Be it junior apps DBA or an Experienced Apps DBA architect, you would encounter this situation atleast once in your life time as an Apps DBA.

Whether you are on an point release upgrade or normal apps patching assume a patch has failed. Patch is about 30 mb and you are half through, you found that its a known issue and applying new pre-req/fix patch would resolve the issue.


Two things can be done here


1) Abort the current patch failing/skipping the workers using adctrl.

2) Apply the new patch which would fix the issue
3) Reapply the main patch which had issue

Patching would be successful but will take up additional time reapplying the main patch. Suitable for DEV/TEST instance but not for Production where downtime is critical.


Lets see the next senario where we can reduce the patching time .


1) Abort the current patch failing/skipping the workers using adctrl.

2) Save the patch/worker state of the current patch to do this follow the steps below

a)Backup the FND_INSTALL_PROCESSES & AD_DEFERRED_JOBS table which is owned by the APPLSYS schema


rename fnd_Install_processes to fnd_Install_processes_bkp;

rename AD_DEFERRED_JOBS_bkp to AD_DEFERRED_JOBS;

b) Backup the .rf9 files located in $APPL_TOP/admin//restart directory.

At this point, the adpatch session should have ended .

c) Backup restart directory


cd $APPL_TOP/admin/

mv restart restart_bkp
mkdir restart

d) Drop the FND_INSTALL_PROCESSES table and the AD_DEFERRED_JOBS table ( we already backed up these).


drop table FND_INSTALL_PROCESSES;

drop table AD_DEFERRED_JOBS;

2)Apply the new patch.


3) Restore the backedup info for main patch i.e FND_INSTALL_PROCESSES,AD_DEFERRED_JOBS, restart directory,.rf9


cd $APPL_TOP/admin/

mv restart restart_old
mv restart_bkp restart


rename fnd_Install_processes_bkp to FND_INSTALL_PROCESSES;

rename AD_DEFERRED_JOBS_bkp to AD_DEFERRED_JOBS

4) Start adpatch, it will resume where it stopped


Note: This will resume the patch and not restart the patch :)

Thanks
Srini

No comments:

Post a Comment


No one has ever become poor by giving