Saturday, 17 June 2017

How to restart a failed patch in r12



Hi Friends,
Some of my friends asked questions related to adpatch. We have some scenario for adpatch failed. Please find the below details:

Suppose, our adpatch fails due to pre-requisite Patch or some other reasons. But we have already spent lots of time on patching.
So, here we have two options either apply the patch again or apply the patch from where adpatch patch is failed.

Off course, everybody likes to save time. So let’s start the below steps to save time and start the patching from where it was failed.

1. We need to shutdown the workers by below command.
$adctrl

Then select option 3 “Tell worker to shutdown/quit”

2. Now, take the backup of the FND_INSTALL_PROCESSES table
Steps:
Connect as applsys because FND_INSTALL_PROCESS is owned by applsys schema.
 
$Sqlplus applsys/<password>

create table fnd_Install_processes_back
as select * from fnd_Install_processes;

Check the both tables should have the same number of rows.

SQL>select count(*) from fnd_Install_processes_back;
1919 rows selected

SQL>select count(*) from fnd_Install_processes;
1919 rows selected

Same way take the backup of the AD_DEFERRED_JOBS table.

$sqlplus applsys/<password>

SQL>create table AD_DEFERRED_JOBS_back
as select * from AD_DEFERRED_JOBS;

Check the both tables should have same number of rows as we checked in above commands.

Now backup the .rf9 files located at below path directory.
$APPL_TOP/admin/ORA-DATA/restart directory.

Here adpatch session should have ended and the cursor should be back at the UNIX prompt.

$echo $ORACLE_SID
ORA-DATA

$ cd $APPL_TOP/admin/ORA-DATA
$ mv restart restart_back
$ mkdir restart
$ chmod 777 restart

Now we are ready to DROP the FND_INSTALL_PROCESSES table and the AD_DEFERRED_JOBS table.

$sqlplus applsys/<password>
$drop table FND_INSTALL_PROCESSES;
$drop table AD_DEFERRED_JOBS;

Now, we are ready to apply the new patch or say pre-req patch in case if you are missing the pre-req patch.
After Pre-req Patch is applied successfully.

Then restore the .rf9 files located at below location as shown above command
$ $APPL_TOP/admin/ORA-DATA/restart_back
directory.
$cd $APPL_TOP/admin/ORA-DATA
$mv restart restart_<patchnumber>
$mv restart_back restart

Again restore the both FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS table owned by the APPLSYS
schema.
$sqlplus applsys/<password>

$create table fnd_Install_processes
as select * from fnd_Install_processes_back;

$create table AD_DEFERRED_JOBS
as select * from AD_DEFERRED_JOBS_back;

Just cross-check the number of rows for both tables which should be equal from above commands.

And now Re-create the synonyms

$sqlplus apps/apps

$create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;

$create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;

Now, we are ready to Start adpatch and it will resume from where it was stopped in previous sessions.

Note: If you ask me frankly, I would like to go through re-apply the patch.

Patch log file location: /u01/oracle/VIS/apps/apps_st/appl/admin/VIS/log


Some more useful links:






Hope this may useful and helpful. Please let us know for any concerns or suggestion in either comment box or contact us @ora-data.blogspot.com

Thanks,

6 comments:

  1. very good blog,thanks you for sharing this infromation to us oracle dba online training in hyderabad

    ReplyDelete

  2. Hi ramana,

    Thanks you.

    Regards,
    ora-data Team.

    ReplyDelete
  3. An impressive share! I have just forwarded this onto a co-worker who has been conducting a little research
    on this. And he in fact bought me lunch because I stumbled upon it
    for him... lol. So let me reword this....
    Thank YOU for the meal!! But yeah, thanks for spending
    some time to discuss this topic here on your web site.


    my blog 192.168.l.2 login ip address

    ReplyDelete
  4. Hello, Neat post. There is an issue with your website in webb explorer,
    may test this? IE nonetheless is the marketplace chief andd a
    big section of otherr people will miss your fantastic writing because of this problem.

    ReplyDelete
    Replies

    1. Dear User,

      I have checked/tested in IE, it is working fine.
      Please check it again and also please update the IE.

      Regards,
      ora-data Team

      Delete
  5. Hello, its fastidios article about mediia print, we all be aware of media
    is a impressive sopurce of data.

    ReplyDelete

Thank you for your comments and suggestions. It's good to talk you.