Search Blog Post

Friday, March 14, 2014

Applying Hot Patch in Oracle EBS

Recently I was told to apply a one-off patch during the peak business hours. Though Oracle recommended approach is to apply all patches "cold"{Shutting down the applications and enable maintenance mode before applying the patch}

You must check README file of all the patches, if it states that there is no need to bring down application services than you can use hotpatch option.
Also, for all the major patch (like AD/FND/ATG) you need to shutdown the application services. And, if you are on Windows you will have to shutdown the application services otherwise the relinking would fail.


So before we begin applying hot patch, let me tell you about defaults file and why do we use it.

Patching in NON-interactive mode
  • Instead of responding to the adpatch prompts, you can create a file which keeps the adpatch responses. In this case you don't have to asnswer to the adpatch prompt and because of this the down time is smaller. The file thus created is called as a defaults file

 Create the response file (the defaultsfile file) 

  •  adpatch defaultsfile=$APPL_TOP/admin/$SID/defaults.txt
  • When AutoPatch ask you for the location of the patch type abort and <ENTER>

$ adpatch defaultsfile=$APPL_TOP/admin/TRCDEV/defaults_0312.txt

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                         Oracle Applications AutoPatch

                                 Version 11.5.0

NOTE: You may not use this utility for custom development
      unless you have written permission from Oracle Corporation.

Attention: AutoPatch no longer checks for unapplied pre-requisite patches.
You must use OAM Patch Wizard for this feature. Alternatively, you can
review the README for pre-requisite information.

Your default directory is '/mnt/DEVapps/trcappl'.
Is this the correct APPL_TOP [Yes] ?

AutoPatch records your AutoPatch session in a text file
you specify.  Enter your AutoPatch log file name or press [Return]
to accept the default file name shown in brackets.

Filename [adpatch.log] :

Defaults Feature Enabled = YES.

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ?

Please enter the batchsize [1000] :

Please enter the name of the Oracle Applications System that this
APPL_TOP belongs to.

The Applications System name must be unique across all Oracle
Applications Systems at your site, must be from 1 to 30 characters
long, may only contain alphanumeric and underscore characters,
and must start with a letter.

Sample Applications System names are: "prod", "test", "demo" and
"Development_2".

Applications System Name [TRCDEV] : TRCDEV *

NOTE: If you do not currently have certain types of files installed
in this APPL_TOP, you may not be able to perform certain tasks.

Example 1: If you don't have files used for installing or upgrading
the database installed in this area, you cannot install or upgrade
the database from this APPL_TOP.

Example 2: If you don't have forms files installed in this area, you cannot
generate them or run them from this APPL_TOP.

Example 3: If you don't have concurrent program files installed in this area,
you cannot relink concurrent programs or generate reports from this APPL_TOP.

Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP [YES] ? YES *

Do you currently have Java and HTML files for HTML-based functionality
installed in this APPL_TOP [YES] ? YES *

Do you currently have Oracle Applications forms files installed
in this APPL_TOP [YES] ? YES *

Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? YES *

Please enter the name Oracle Applications will use to identify this APPL_TOP.

The APPL_TOP name you select must be unique within an Oracle Applications
System, must be from 1 to 30 characters long, may only contain
alphanumeric and underscore characters, and must start with a letter.

Sample APPL_TOP Names are: "prod_all", "demo3_forms2", and "forms1".

APPL_TOP Name [gddevap1] : gddevap1 *

You are about to apply a patch to the installation of Oracle Applications
in your ORACLE database 'TRCDEV'
using ORACLE executables in '/mnt/DEVapps/trcora/806'.

Is this the correct database [Yes] ?

AutoPatch needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.

Enter the password for your 'SYSTEM' ORACLE schema:

The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS

Enter the ORACLE password of Application Object Library [APPS] :

AutoPatch is verifying your username/password.
The status of various features in this run of AutoPatch is:

                                           <-Feature version in->
Feature                          Active?   APPLTOP    Data model    Flags
------------------------------   -------   --------   -----------   -----------
CHECKFILE                        Yes       1          1             Y N N Y N Y
PREREQ                           Yes       6          6             Y N N Y N Y
CONCURRENT_SESSIONS              No        2          2             Y Y N Y Y N
PATCH_TIMING                     Yes       2          2             Y N N Y N Y
PATCH_HIST_IN_DB                 Yes       6          6             Y N N Y N Y
SCHEMA_SWAP                      Yes       1          1             Y N N Y Y Y

Identifier for the current session is 3835

Reading product information from file...

Reading language and territory information from file...

Reading language information from applUS.txt ...

Reading database to see what industry is currently installed.

Reading FND_LANGUAGES to see what is currently installed.
Currently, the following language is installed:

Code   Language                                Status
----   --------------------------------------- ---------
US     American English                        Base

Your base language will be AMERICAN.

Setting up module information.
Reading database for information about the modules.
Saving module information.
Reading database for information about the products.
Reading database for information about how products depend on each other.
Reading topfile.txt ...

Saving product information.

AD code level : [11i.AD.I.7]

Trying to obtain a lock...

Attempting to instantiate the current-view snapshot...

Instantiated bug-fix info from baseline info.

Enter the directory where your Oracle Applications patch has been unloaded

The default directory is [/mnt/DEVapps/patches/10179153] : abort    + ENTER     !!!!!



  •   Verify that the defaults file exists in APPL_TOP/admin/<SID> directory:

Now we can apply patch by itself using defaults file, adpatch will pick APP_TOP, ORACLE_HOME information, system password and apps password from defaults file.

This way you can reduce your patch timing using defaults file .
Now, let see the following option when calling adpatch for applying a hot fix:
options=hotpatch 

$ adpatch defaultsfile==$APPL_TOP/admin/TRCDEV/defaults_0312.txt logfile=all_10179153.log \
patchtop=/mnt/DEVapps/patches/10179153 \
driver=u10179153.drv \
workers=8 \
interactive=yes \
options=novalidate,hotpatch

HTH
Thanks for reading.

2 comments: