Friday, 15 November 2013

How to restart the failed adpatch session

So many times adpatch session get failed because of prerequisit patch, some prerequisit steps which you forget to follow and some time it get failed because invalid objects etc.So from the below given steps you can secure the adpatch session and can restart from where it get failed.

1.  Backup the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema
$ sqlplus applsys/<password>
SQL> create table fnd_Install_processes_back as select * from fnd_Install_processes;
--The 2 tables should have the same number of records.
select count(*) from fnd_Install_processes_back;
select count(*) from fnd_Install_processes;

2.  Backup the AD_DEFERRED_JOBS table.
create table AD_DEFERRED_JOBS_back as select * from AD_DEFERRED_JOBS;
--The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_backup;
select count(*) from AD_DEFERRED_JOBS;

3.  Backup the .rf9 files located in $APPL_TOP/admin/<SID>/restart directory.
At this point, the adpatch session should have ended and the cursor should be back at the Unix prompt.
$ cd $APPL_TOP/admin/<SID>
$ mv restart restart_backup
$ mkdir restart

4.  Drop the FND_INSTALL_PROCESSES table and the AD_DEFFERED_JOBS table.
$ sqlplus applsys/<password>
SQL> drop table FND_INSTALL_PROCESSES;
SQL> drop table AD_DEFERRED_JOBS;

5.  Apply the prerequisite patch. or complete the prerequisite steps.

6.  Restore the .rf9 files located in $APPL_TOP/admin/<SID>/restart_backup directory.
$ cd $APPL_TOP/admin/<SID>
$ mv restart restart_<patchnumber>
$ mv restart_backup restart

7. Restore the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema.
$ sqlplus applsys/<password>
SQL> create table fnd_Install_processes as select * from fnd_Install_processes_backup;
--The 2 tables should have the same number of records.
SQL> select count(*) from fnd_Install_processes;
SQL> select count(*) from fnd_Install_processes_backup;

8. Restore the AD_DEFERRED_JOBS table.
$ sqlplus applsys/<password>
SQL> create table AD_DEFERRED_JOBS as select * from AD_DEFERRED_JOBS_backup;
--The 2 tables should have the same number of records.
SQL> select count(*) from AD_DEFERRED_JOBS_backup;
SQL> select count(*) from AD_DEFERRED_JOBS;

9. Re-create synonyms
$ sqlplus apps/apps
SQL> create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;
SQL> create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;

10. Start adpatch, it will resume where it stopped previously.

No comments:

Post a Comment