Tuesday 6 October 2015

R12 Patch Failed & How to Restart Steps

R12 Patch Failed & How to Restart Steps
Patch failed but the fix is another patch!
Fortunately this happens infrequently (in my experience) and is usually caught the first time patch(es) are applied in a sandbox or dev environment. There could be a few reasons why this happens, a couple off the top of my head:

- Your patch analysis wasn't complete. [If you have been in pre-req hell before, it can be very easy to miss a patch.
- You've hit a bug and Oracle informs you another patch is required.
- Some large patches, especially family packs usually have functional prerequisites. These are usually in the README file as a chart which lists the product, feature and patches required. If you are using, or plan to use the products listed in the chart, you are required to apply the patch(es).

Just recently, we hit an issue in which we had to go back and apply a functional pre-req for a module we don't use.

So how do you resolve this? There are two options:

1. Cancel the patch, apply the new patch, then start the first one over again.
2. Backup the first patch, apply the new patch, restore the first patch and let it continue where it left off.

The benefit of option 2 is to save deployment time. Obviously if you are 2-3 hours into a large patch and you choose option 1 you have to start over.

So, the steps to backup the first patch are:

1. Use adctrl to shutdown all of the workers.
2. Backup the FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables.
3. Backup the .rf9 files under $APPL_TOP/admin/[SID]/restart
4. Drop the tables in step 2.
5. Apply the new patch.
6. Restore the .rf9 files backed up in step 3.
7. Restore the tables backed up in step 2.
8. Recreate Synonyms under apps:
- create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;
- create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;
9. Start adpatch and continue.


Now, this only works if one of the workers fail while executing tasks for the first patch. If a fatal error happens elsewhere then you can't use the steps above.


Demo For Patch Failed & Restart:-
[oracle@track Patches]$ ls –lrt                          Dependent    Main
total 24                                                   Patch      Patch
drwxr-xr-x  28 oracle dba 4096 Sep  6 15:04 10396497              1)*
drwxr-xr-x   3 oracle dba 4096 Sep  6 17:22 6867725         5)          3)#
drwxr-xr-x   5 oracle dba 4096 Sep  6 17:56 8833142         4)          3)#
drwxr-xr-x  11 oracle dba 4096 Sep  6 18:02 9438856         3)#         2)@
drwxr-xr-x   4 oracle dba 4096 Sep  7 11:02 9100421         6)%
drwxr-xr-x  15 oracle dba 4096 Sep  7 11:27 11772495  2)@         1)*
drwxr-xr-x   4 oracle dba 4096 Sep  7 11:58 6858194         7)&         6)%
drwxr-xr-x  11 oracle dba 4096 Sep  7 15:36 11884093  8)          7)&

a)

SQL> create table fnd_install_processes_fv1 as select * from fnd_install_processes;

Table created.

SQL> create table ad_deferred_jobs_fv1 as select * from ad_deferred_jobs;

Table created.

b)

TAKE RESTART Folder backup from $APPL_TOP/admin/SID/

c)
Apply the Pre-Requisite Patch Required by above installed Patch.

d)

SQL> create table APPLSYS.AD_DEFERRED_JOBS as select * from AD_DEFERRED_JOBS_fv;

Table created.

SQL> create table APPLSYS.FND_INSTALL_PROCESSES as select * from FND_INSTALL_PROCESSES_fv;

Table created.

e)

SQL> create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;

Synonym created.

SQL> create synonym FND_INSTALL_PROCESSES for APPLSYS.FND_INSTALL_PROCESSES;

Synonym created.

f)

Move the Backed up restart folder [done at point (b)] to $APPL_TOP/admin/SID/ location.

g)

Apply the Patch which you was started first (i.e. before appling Pre-Requisite Patch).
 
Thanks
Srini

No comments:

Post a Comment


No one has ever become poor by giving