Friday 7 June 2013

Patching



Patching is one of the most frequent Jobs Apps DBA performs.

Patches are created by oracle for inhancement of applicaion or if there are any bugs or problems in existing application. Oracle provides a utility called Auto patch or adpatch to applly Application patches.
As we apply Database patch using opatch ,similarly for Apps patch we use adpatch.

Patch: A patch can be a solution for a bug or it can be a new feature.

I. Types of Patches:

 

a: Individual Patch, One-off, Standalone: 

  A one of patch is a small patch of (30-90k) size withou6t any prerequisite. This is created to fix one particular bug.

 

b: Patch Set, Mini Pack: 

  Patch Set was the original term used in R10. In R11 the same type of patch is now being called a Mini Pack.
    This patch is the collection of one-off patches for a particular product like AK, FA , AP and named like 11i.FA.E (means this group of patches contain fix for 11i FA product (FA till time E is released ).
This is cumulative which means it will include 11i.FA.A, 11i.FA.B ....11iFA.D till 11i.FA.E.

 

c: Family Pack:

  Group of mini packs in one family bundled together is called as family pack.
   They are usually named as 11i_PF. Few example of families are SCM ( 11i.SCM_PF.G ), ATG ( 11i.ATG_PF.H ) _PF indicate Product Family Pack.

 

d: Maintenance Pack :

Group of family pack together is called as Maintenance packs that serves as point level release upgrade. So if you say your Version is 11.5.10 then its maintenance pack 10 ( 3rd digit is maintenance pack ).

 

To wind up things you can say.

Few one off patch makes mini pack.
Few mini pack related to same family bundled together as family pack.
All family pack fixed till that time are bundled in Maintenance pack.

 

e: NLS Patch:

If you have more than one language, like English & Arabic or French, then apart from normal patch you have to apply patch for specific language Installed in your system called as NLS patch.



2: Patch file Structure:

     When you unzipped a patch you will see several files and one or more sub-directories.
The top level directory is '(pathnumber)' denoting the number of patch.
The most important files in the directory are README.txt, README.html and the driver files (c, d, g or u).
The README.txt or README.html files of  the patch describe what patch dose. It also explains any step required to apply the patch eg: prerequisite or manual steps.
         When you unzipped a patch it contains three drivers “c,d,g” or “u”. These are called copy, database, generate drivers or Unified drivers. The unified driver is the combination of all the three c,d,g drivers.



a: Copy Driver : (cXXXXX.drv )
C driver Copies all files from patch unziped directory to the required location in your application file system.
Before copying it will check the version of the existing file at file system with the file version of the file in the patch. if the file version is higher than what it is at the file system level then only c-driver will copy that file.


b: Database Driver : ( dXXXXXX.drv )
The database driver contains all the commands to change the database objects. This is the driver that runs .sql, .pls, .odf and other files that update the database.
Some common ways the database is updated by the this driver are:
– Create packages
– Create new error messages
– Add a new table or view to the database
– Add a new column to a table
– Add new seed data to a table

–Compiles all the invalid objects that are there in the database.


c: Generate Driver : (gXXXXXX.drv )
The genreate driver generate all Forms, Reports and PL/SQL libraries that have been effected by patch.



d: Unified Driver : ( uXXXXXXX.drv )
The u driver is a merged driver that is a combined c, d, and/or g driver. Oracle is beginning to release a majority of its patches as unified driver patches. If a patch is a unified driver patch, then only the u driver is applied.