Apps DBA Tutorial 02 - Patching

There are 5 types of patches. They are ->

A. Individual patches

B. Mini Packs

patch + patch. During a release cycle a product combines individual patches in mini packs. Earlier it was called "patch sets".

C. Maintainence Packs
mini pack + mini pack. Earlier it was called "Release Updates".

D. Family rollup
product mini pack + product mini pack. During a release cycle, all the minipacks of a product family are combined.

E. Family consolidated upgrade patches [FCUP]
product update patch + product update patch. To improve the performance of upgrade process FCU P is introduced. FCUP combines all product patches that update all known issues during "auto upgrade" portion of upgrade.




Patch Drivers

Copy Driver

naming convension c<patch_number>.drv.
It copies all new files to $APPL_TOP. It should be applied in all nodes for multi node environment.


Database Driver

naming convension d<patch_number>.drv. It should be applied in Admin server's $APPL_TOP only for multi node environment. It does the following ->

makes a list of invalid objects in DB
run sql scripts and make changes in DB.
Compile all invalid objects in DB


Generate Driver

naming convension g<patch_number>.drv.
It regenerates all forms, reports, pl/sql libraries that have been affected by the patch.


Unified Driver

naming convension u<patch_number>.drv.
It is combination of c,d and g drivers. It executes the actions of c, d and g in orders.



Features of of Auto Patch ->

A. During patch application, autopatch appends a record of how it changed system to applptch.txt in $APPL_TOP/admin/<SID> directory. It records summary information in applsum.txt located under APPL_TOP/admin directory.

B. If there are other language other that US english the NLS patch needs to be applied immediately on each node after patch application.


During applying a patch in Multi node or two nodes system remember the following ->




Admin Server Forms Server Web Server Conc Proc
c driver Y Y Y Y
d driver Y N N N
g driver Y Y Y Y






How to Apply Patch in Standard [Interactive] Mode

http://www.oracle-latest-technology.com/2011/01/how-to-apply-ad-patches-on-oracle.html




Non interactive patch application

Non interactive modes means applying a patch without user intervention. For this we need to create a auto patch defaults file for application system. To create this file for the first time the following command is used.

$ adpatch \ defaultsfile=$APPL_TOP/admin/$TWO_TASK/def.txt

Now answer all the questions for one time.

Later on apply patch in non interactive mode with the following command ->

$adpatch defaultsfile-$APPL_TOP/admin/$TWO_TASK/def.txt \




Run a patch in test mode

Use the following command to run Oracle R12 patches in test mode.
$adpatch apply=no



Run a patch in preinstall mode

Preinstall mode is normally used to update AD utilities before an upgrade to Oracle Application.
$adpatch preinstall=y



Merging Patches

sometimes many patches needs to be applied one after another. In that scenario we need to merge those patches using admrgpch utility. The steps are as follows ->
1. In patch_top create two folders source and target
2. download and unzip all patches in source directory.
3. run admrgpch in the following way.
Admrgpch -s source -d destination -merger_name <name for the patch/driver>





ADPATCH command line options

options are added in the file in the following way. $adpatch optionss = <option_name>.

[* is default option]

A. autoconfig*/noautoconfig
If you do not want to run autoconfig after applying the patch.


B. checkfile*/nocheckfile
Whether to run EXEC, SQL and EXECTIER commands.

C. compiledb*/nocompiledb
Whether to compile database after applying the patch.

D. compilejsp*/nocompilejsp

E. copyportion*/nocopyportion
nocopyportion will not execute the c driver action.

F. databaseportion*/nodatabaseportion
nodatabaseportion will not execute the d driver action.

G.generateportion*/nogenerateportion

H. hotpatch/nohotpatch*
Tells oracle application to apply patch without reconsidering whether the system is on maintainence mode.

I. integrity/nointegrity

J. parallel*
update database in parallel.

K. validate/novalidate*
validate all schema password information.

L. apply=no
Run autopatch in test mode.

M. preinstall=y
Only used during upgrades or when patching adpatch itself.

N. options=nolink
Wouldn't link updated executable after patching.

O. options= nogenrpll/nogenform/nogenrep

Won't generate .pll/Forms/reports.






When R12 Patch fails

When a patch fails the first task is to look into $APPL_TOP/admin/$TWO_TASK/log. If the worker fails during patch application then follow the following link ->







Monitoring the Patches in Progress

  1. login to db as sysdba
  2. SQL> alter user ad_monitor account unlock;
The default password for ad_monitor is "lizard".

  1. Shutdown the middletier.
  2. Enable maintainence mode using adadmin.
  3. Start apache in maintainence mode using following command.

$adaprstctl.sh start

  1. Run the autopatch using adpatch.
  2. Go to
<host>:<port>/servlets/weboamLocal/oam/oamLogin

  1. Login here with ad_monitor account.
  2. Go to Sitemap>Maintainence>Patching and utilities?Timing Reports.

Now, you can monitor the following AutoPatch Messages, Patch Log Files, relink log files, Workers Log.























No comments :