How to apply patch while you are in the middle of patching


Sometimes when you are in the middle of applying a patch you may get adworkers errors or you can find out that a patch is missing. So you need to apply a second patch (which solves the problem) in the middle of a running patch.

1. Use adctrl (option 3) to tell all the existing workers to QUIT


2. Use adctrl (option 5) to tell managers that all workers have QUIT. (Adpatch session ends!)


3. Backup tables applsys.ad_deferred_jobs and applsys.fnd_install_processes.


Login as APPLSYS user and execute:

ALTER "TABLE" applsys.ad_deferred_jobs "RENAME" TO ad_deferred_jobs_old;

ALTER "TABLE" applsys.fnd_install_processes "RENAME" TO fnd_install_processes_old;

ALTER "INDEX" applsys.ad_deferred_jobs_u1 "RENAME" TO ad_deferred_jobs_u1_old;

ALTER "INDEX" applsys.fnd_install_processes_u1 "RENAME" TO fnd_install_processes_u1_old;


4. Go to $APPL_TOP/admin/SID/ for example $APPL_TOP/admin/TEST/ and rename the existing directory "restart"

$mv restart restart.old


5. Use adpatch to apply the second/other patch.


6. Login as APPLSYS and revert back to the original tables, ad_deferred_jobs and fnd_install_processes

ALTER "TABLE" applsys.ad_deferred_jobs_old "RENAME" TO ad_deferred_jobs;

ALTER "TABLE" applsys.fnd_install_processes_old "RENAME" TO fnd_install_processes;

ALTER "INDEX" applsys.ad_deferred_jobs_u1_old "RENAME" TO ad_deferred_jobs_u1;

ALTER "INDEX" applsys.fnd_install_processes_u1_old "RENAME" TO fnd_install_processes_u1;


7. Replace the original restart directory:

cd $APPL_TOP/admin/SID/ for example $APPL_TOP/admin/TEST/

mv restart restart_new

mv restart.old restart


8. Run adpatch to continue the first patch (with continue session?Yes)


9. Use adctrl (option 2, will change status to “Fixed/Restart”) to restart the failed workers for first patch 

No comments:

Post a Comment