Oracle
Apps Patching
Patch is a program to fix a particular problem or
enhance/add a particular feature in existing program/product/software
Here is the basics steps
for patching
STEP 1 :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>’;
select * from AD_BUGS where bug_number=’<patch number>’;
STEP 2 : Download the patch.
Login to oracle metalink.(www.metalink.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 .
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 .
If you have downloaded the
patch at desktop then move it to directory where you want it to unzip.
mv <patch.zip> <destination patch directory>
eg: mv p4003579_linux.zip /u1/apps/patch
eg: mv p4003579_linux.zip /u1/apps/patch
STEP 3 :Unzip the patch. For this
Log in as application tier user.
Go to the directory where you have your patch directory & type command-
unzip patch.zip
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 4 :Enable the Maintenance Mode. For
This:
Set the environment file
located in APPL_TOP.
Run the ad administration utility by typing adadmin on unix/linux console. It will ask questions related to admin utility with default answers in brackets.Then it shows following options & ask for the choice:
Run the ad administration utility by typing adadmin on unix/linux console. It will ask questions related to admin utility with default answers in brackets.Then it shows following options & ask for the choice:
$adadmin
1.Generate applications file
menu.
2.Maintain applications file menu.
3.Compile/Reload Applications Database Entities Menu.
4.Maintain Applications Database Entities Menu.
5.Change Maintenance Mode.
6.Exit ad Administration.
2.Maintain applications file menu.
3.Compile/Reload Applications Database Entities Menu.
4.Maintain Applications Database Entities Menu.
5.Change Maintenance Mode.
6.Exit ad Administration.
Select option 5. The
status of maintenance mode is displayed at the top of change maintenance mode
menu.Again it will show following options & ask for choice:
1.Enable Maintenance mode.
2.Disable Maintenance mode.
3.Return to Main Menu.
2.Disable Maintenance mode.
3.Return to Main Menu.
Select option 1. Then return
to console.
Note : To check maintenance mode status
sql
>
select
apps.fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
This should say MAINT for
enabled
For
disabled it say like NORMAL
STEP 5: Run
autopatch from the patch directory by entering the following command:
$ adpatch
This is adpatch without options ie default options . We
will discuss the options later
After this answer the
questions of autopatch. As autopatch finishes its tasks, it writes timing
information to the AD timing report for jobs running in parallel (if any ) and
reminds you to run the log files for any errors.
If you don’t see the “autopatch is complete”
message at the end of the Autopatch log file, Autopatch did not complete
successfully.
Patching Techniques
When patch is running we can
check the worker status by using adctrl AD tool.
While patching some jobs
failed and we need to fix it then only the patch will continue . At that time
we can use adctrl for monitoring the workers
Run the ad administration
utility by typing adctrl on unix/linux console. It will ask
questions related to admin utility with default answers in brackets.Then it
shows following options & ask for the choice:
AD Controller Menu
---------------------------------------------------
1. Show worker status
2. Tell worker to restart a failed job
3. Tell worker to quit
4. Tell manager that a worker failed its job
5. Tell manager that a worker acknowledges quit
6. Restart a worker on the current machine
7. Exit
---------------------------------------------------
1. Show worker status
2. Tell worker to restart a failed job
3. Tell worker to quit
4. Tell manager that a worker failed its job
5. Tell manager that a worker acknowledges quit
6. Restart a worker on the current machine
7. Exit
Option 1 to show the worker status
Option 2 to restart the failed worker
Option 3 to quit the worker
Option 8 is not documented
Enter 8 to skip the worker and continue the patch
process
Once the patch completes we need to check the patch
logs for verifying the patch is successfully completed or not
Patch log
location:
$APPL_TOP/admin/SID/log/adpatch.log
Worker log
location:
$APPL_TOP/admin/SID/log/adwork001.log
--- for 1st worker
$APPL_TOP/admin/SID/log/adwork002.log
--- for 2nd worker .....
In patch log check for the word failed and execute the job manually for completing the patch
AD Patching
options
We can check all the patching options by using
$ adpatch
help=y
Now we will see the most commonly used options
preinstall – To run adpatch in Pre-Install Mode.
Default – No.
Default – No.
logfile – Adpatch log file name.
Default – none. Adpatch prompts for this value.
workers – Specifies the number of workers to run.Default – none. Adpatch prompts for this value.
Default – none. Adpatch prompts for this value.
patchtop – Top-level directory for the current patch.
Default – none. Adpatch prompts for this value.
driver – Name of the patch driver file.
Default – none. Adpatch prompts for this value.
compiledb – To compile invalid objects in the database
after running actions in the database driver.
Default – compiledb.
compilejsp – To compile out-of-date JSP files, if the patch
has copy actions for at least one JSP file.
Default – compilejsp.
autoconfig – To run AutoConfig.
Default – autoconfig.
The
options= argument is used to pass generic options to AutoPatch. It takes the
form
of a comma-separated list. Enter one option or a comma-separated list of options. For
example, options=nocompiledb,nocompilejsp. Do not include a space after the
of a comma-separated list. Enter one option or a comma-separated list of options. For
example, options=nocompiledb,nocompilejsp. Do not include a space after the
AD Merge Patch
When you apply patches individually, you must perform
patching tasks multiple times. For example, for every individual patch there
may be duplicate link and generate processes. AD Merge Patch merges multiple
patches into a single patch so that the required patching tasks and processes
are performed only once.
i.e. admrgpch -s ./source -d ./target -merge_name merged001
i.e. admrgpch -s ./source -d ./target -merge_name merged001
For
eg we are going to merge 662540 patch and 777537 patch
Assume
we extracted both the patches in /u1/app/oracle/appl location
admrgpch
-s /u1/app/oracle/appl/662540 -d ./ u1/app/oracle/appl/777537 -merge_name
merged01
This
command will create a merged driver merged01.drv file in the current folder.
Then we use this driver file to apply this patches
Types of patches:
There are several different types of patches
following are more common patches One-Off Patch
This is simplest Patch to resolve a specific bug
Minipack Patch
Collection of One of Patches and enhancements related to a particular module. Alphabetic character denotes the Minipack version for the module.
Family Pack Patch
Collection of Minipack patches for a particular family group of application modules
Maintenance pack patch
This is collection of family packs that serves as point level release upgrade
Consolidated patch
Collection of one-off fixes for a family pack or maintenance pack Oracle Application 11.5.10 Consolidated Update 2 (CU2) is an example of consolidated patch.
Interoperability patch
Patch that is required for application to function with a newer version of technology stack
NLS patch
Patch that updates language specific information for multi language installation
Rollup patch
This is a collection of one off patches that update code levels for particular product
Legislative patch
Special patch for HR payroll customers it contains legislative data for multiple countries
No comments:
Post a Comment