Wednesday, August 26, 2009

Merge Patches using admrgpch

Admrgph utility is used to merge two or more patches in oracle apps. The advantage of merging patches is that it reduces downtime as the repetitive task of compiling invalid database objects,  generating forms and reports,jar files etc.
How to use Admrgpch to merge patches
Download the  patches in /patch directory. Now create 2 subdirectory in /patch say mergesource -which contains  the unzipped patches to be merged and mergedest -which contains the merged patch. Please note that both mergesource and mergedest should be created as immediate child of same parent directory say /patch. Now you can execute the following command to merge the patches.
admrgpch -s <source> -d <dest> -merge_name <mergename>
For example->
admrgpch -s </patch/mergesource> -d </patch/mergedest> -merge_name <amebrup2>
Please make sure the the merge path log file "admrgpch.log" does not contain any error. If the  above command to merge patches completes successfully then it displays the following->
Executing the merge of the patch drivers
-- Processing patch: /patch/mergesource/5708576
-- Done processing patch: /patch/mergesource/5708576
-- Processing patch: /patch/mergesource/4428060
-- Done processing patch: /patch/mergesource/4428060
Copying files...
5% complete. Copied 269 files of 5373...
10% complete. Copied 538 files of 5373...
15% complete. Copied 806 files of 5373...
20% complete. Copied 1075 files of 5373...
25% complete. Copied 1344 files of 5373...
30% complete. Copied 1612 files of 5373...
35% complete. Copied 1881 files of 5373...
40% complete. Copied 2150 files of 5373...
45% complete. Copied 2418 files of 5373...
50% complete. Copied 2687 files of 5373...
55% complete. Copied 2956 files of 5373...
60% complete. Copied 3224 files of 5373...
65% complete. Copied 3493 files of 5373...
70% complete. Copied 3762 files of 5373...
75% complete. Copied 4030 files of 5373...
80% complete. Copied 4299 files of 5373...
85% complete. Copied 4568 files of 5373...
90% complete. Copied 4836 files of 5373...
95% complete. Copied 5105 files of 5373...
100% complete. Copied 5373 files of 5373...
Character-set converting files...
  2 unified drivers merged.
Patch merge completed successfully
Please check the log file at ./admrgpch.log
Now go to the destination merge patch directory say "mergedest". You can see that the admrgpch already created a driver with name "u_<mergename>.drv" say u_amebrup2.drv. Now apply the merged patch as a single patch using  adpatch. So you have to give this driver name u_<mergename>.drv" when prompted.
Restrictions of admrgpch ->
It will not merge patches of different releases,platform,different parallel modes. Also do not use admrgpch to merge AD and Non-AD patches ad AD patches will change the patch utility itself.

Technorati Tags: ,,,,

7 comments:

danish297 said...

thanks for sharing this valuable info.

Anonymous said...

Thank you, very helpful!

Matthew Arnesto Pintor said...

can i merge a patch to a merged patch?

sample is patch A and patch B merge to patch C. then merge patch C and patch D to patch E.

is that possible?

Unknown said...

Hi how to apply non-AD merged patches with opatch utility.


and what are the level and how i can apply these non-ADmerged patches...like in database tier,application tier

Anmol said...

@Bala Subramanian
Plz note Merged patches are applications patches. You have to use adpatch to apply them. You cannot use opatch because opatch utility is used to apply database patches only..
Non-AD/AD merged patches have to be applied on application node only..

Anmol said...

@Matthew Arnesto Pintor ...I don't see any issue in merging a path to a merged patch... Moreover, the new merge patch log, will list any errors it might have encountered during merging of patches..

Anmol said...

Many times, people ask whether i can merge a patch with its prereq patch and the answer is that yes,..a patch can be merged with its pre-req patches.