0% found this document useful (0 votes)
103 views5 pages

Patches

Patching in detail with different types of patching

Uploaded by

Asif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views5 pages

Patches

Patching in detail with different types of patching

Uploaded by

Asif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Patches

Patch is program (set of instrcutions) to fix a particular problem or


enhance add a particular feature in existing program/product/software.

Tool to apply patch : adpatch

Types of Oracle Apps patch :

1: One-off patches This is used to define patch created to fix


single/particular problem.
2: Mini Pack This is group of oneoff patches for a particular product
like INV, GL, AP and named like 11i.GL.E ( means this group of
patches contain fix for 11i GL product (General Ledger till time E is
released ) This is cummutative which means it will include 11i.GL.A,
11i.GL.B ....11iGL.D till 11i.GL.E earlier in 10.7 it used to called as
patchset.
3: Family Pack Group of mini packs in one family buldeled together is
called as family pack. they are usually named as 11i_PF. Few example
of falilies are SCM
( 11i.SCM_PF.G ), ATG ( 11i.ATG_PF.H ) _PF indicate Product Family
Pack.
4: Maintenance Pack Group of family pack together is called as
maintenance pack. So if you say your Verison is 11.5.10 then its
maintenance pack 10 ( 3rd digit is maintenance pack ).

Structure Of a Patch :

The unzipped patch 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.

When you unzip a patch you will see some files types :
readme.txt - This file contain steps to spply patches, List of Prerequisite patch should be
there on apps Instance (If not apply that patch )
cXXXXXXX.drv c stand for copy driver file , this copies patch content to respective
patch location , driver is like bus driver which provides instruction on work adpatch need
to perform.
dXXXXXXX.drv d stand for Database driver & contain content related to database like
creating packages, tables, adding column….
gXXXXXXX.drv This contain files related to forms , reports, graphis or messages
uXXXXXXX.drv Sometime these three types of files are bundled together into single
driver file called Unified driver file .

AUTOPATCH MODES
Patch information is stored in the database only if the update is run in normal mode.
Patch information is not stored immediately in the database when run in pre-install and
not stored at all when run in test mode. If the update does not complete successfully, the
patch information is not uploaded to the database nor is it written to the Patch History
file.
Normal mode
$adpatch
When AutoPatch is run in normal mode, all patch history information is directly uploaded
to the database.
Test mode
$adpatch apply=no
When AutoPatch is run in test mode, no upload of applptch.txt occurs and patch history
information is not stored. The Patch History file is not changed.
Pre-install mode
$adpatch preinstall=y
As AutoPatch does not connect to the database in pre-install mode, the patch information
is not directly uploaded to the database. In pre-install mode AutoPatch writes patch
history information to the Patch History file. The contents of this file are uploaded to the
database the next time AutoPatch is run in normal mode.

Document patch (no downtime and no maintenance mode


$adpatch apply=hot

Non-interactive mode
The patch history database feature does not distinguish between interactive and non-
interactive mode. Whether or not patch history information is stored in the database is
determined by the operational mode used: Normal, Test, or Preinstall.

Steps to apply a patch :


STEP 1: Count/preserve invalid objecs.
sql>select count(*) from dba_objects where status like 'INVALID';
sql>SQL> create table patch_10052153_bkp as select * from dba_objects where status
='INVALID';
sql>create table invalid_obj0 as select * from dba_objects where status ='INVALID';
sql>select count (*) from invalid_obj0 where status='INVALID';

STEP 2 :Before applying a patch you must check whether the patch is already there or
not. For this we query the database:

*sqlplus apps/<apps password>@<tnsalias> then


select * from AD_BUGS where bug_number=’<patch number>’

-> Patch History:


1. You can know whether particular patch is applied or not using ad_applied_patches or
ad_bugs

2. Using OAM->Patch wizard-> Give patch numer

STEP 3 : Download the patch.

*login to oracle support .( https://support.oracle.com)


*Select the patches option then select the search type.
*Query for patch by writing the patch no. & platform on which you want to download the
patch.
*Click download .

STEP 4 :Unzip the patch.


*log in as application tier user.
*Go to the directory where you have your patch directory & type command-
unzip patch.zip

This will unzip the patch in current directory & will make the required patch directories
& sub directories.

STEP 5 : down the application services and Enable the Maintenance Mode.

STEP 5: Run autopatch from the patch directory by entering the following command:

$ adpatch

Check the logfile after appyly patch :

Location : $APPL_TOP/admin/<SID>/log

How to apply a patch in Non-Interactive mode :

$adpatch defaultsfile=$APPL_TOP/admin/SID/adalldefaults.txt logfile=4734534.log


interactive=n workers=6 patchtop=/u02/4734534 driver=u4734534.drv.

Reduce patch time

Skipping patch driver actions

$adpatch options=nodatabaseportion,nodatabaseportion,nogenerateportion

Skipping post patch activies

5472634 $adpatch options=nocompiledb,nocompilejsp,noautoconfig (skip)


5474548 $adpatch options=nocompiledb,nocompilejsp,noautoconfig
(skip)

9589858 $adpatch options=compiledb,compilejsp,autoconfig (Don't skip),

Usage of Admerging

create two directories like eg: $mkdir source dest

Copy all patches directories to source directiory

source$admrgpch -s source -d dest -logfile logfile.log

PATCH HISTORY DATABASE TABLES :


Table Name Description :
.AD_APPLIED_PATCHES : Stores information about all distinct updates applied.
AD_BUGS Stores information about all distinct bug fixes applied.
AD_DRIVERS Stores information about the drivers that comprise an update.
AD_FILE_VERSIONS Stores version information for files.
AD_PATCH_COMMON_ACTIONS :Stores information about actions in update driver
files.
AD_PATCH_DRIVER_LANGS : Stores information about the languages included in an
update driver file.
AD_PATCH_DRIVER_MINIPKS : Stores information about mini-packs
AD_PATCH_HIST_TEMP :patch history

4. Log files during patching?

1. patchnumber.log ($APPL_TOP/admin/SID/LOG/patchnumber.log)
2. patchnumber.lgi($APPL_TOP/admin/SID/LOG/patchnumber.lgi)
3. adworker.log($APPL_TOP/admin/SID/LOG/adworker001.log
4. l.req($APPL_TOP/admin/SID/LOG/l1248097.req)
5. adrelink.log($APPL_TOP/admin/SID/LOG/adrelink.log)
6. adrelink.lsv($APPL_TOP/admin/SID/LOG/adrelink.lsv)
7.autoconfig.log($APPL_TOP/admin/SID/LOG/autoconfig_3307.log)

Errors;

Sql>rename fnd_install_process to fnd_install_process_bkp;


Sql>rename ad_defferred_jobs to ad_defferred_jobs_bkp;
$APPL_TOP/admin/PROD/
$mv restart restart_bkp
Then apply the pre-req patch
After that
Sql> rename fnd_install_process_bkp to fnd_install_process:
Sql>rename ad_defferred_jobs_bkp to ad_defferred_jobs;
$mv restart_bkp restart
$ adpatch (then apply adpatch)
Do you want to continuous previous session=yes

-- Preinstall steps
1. Create $ORACLE_HOME/appsutil/admin on the
database server.
2. Copy adgrants.sql (UNIX) from this patch
directory to
$ORACLE_HOME/appsutil/admin.
Or, copy adgrants_nt.sql (Windows) from this patch
directory to
%ORACLE_HOME%\appsutil\admin.
[oracle@erp admin]$ mkdir -p
$ORACLE_HOME/appsutil/admin
[oracle@erp admin]$ cp
/d02/oracle/R12_R1206/7305220/admin/adgrants.sql
.
3. Set the environment to point to ORACLE_HOME on
the database
server.
4. Use SQL*Plus to run the script:
UNIX:
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql
<APPLSYS schema
name>
sqlplus "/as sysdba" @adgrants apps

You might also like