Tuesday, January 3, 2012

How to apply a new patch when adpatch is already running

Reference: Metalink Note: 175485.1

Using the adctrl utility, shutdown the workers.
a. adctrl
b. Select option 3 “Tell worker to shutdown/quit”

c. Backup tables
sqlplus applsys/
create table FND_INSTALL_PROCESSES_3480000as select * from FND_INSTALL_PROCESSES;
create table AD_DEFERRED_JOBS_3480000as select * from AD_DEFERRED_JOBS;

drop table FND_INSTALL_PROCESSES;
drop table AD_DEFERRED_JOBS;

d.From OS:
cd $APPL_TOP/admin/
mv restart restart_
mkdir restart

e.Apply the new patch.
Once patch completed.
cd $APPL_TOP/admin/
mv restart_ restart.

f.recreate the tables
sqlplus applsys/
create table FND_INSTALL_PROCESSESas select * from FND_INSTALL_PROCESSES_3480000;
create table AD_DEFERRED_JOBSas select * from AD_DEFERRED_JOBS_3480000;
create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;
create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;

Now Restart adpatch, it will resume where it stopped previously