Académique Documents
Professionnel Documents
Culture Documents
PURPOSE
-------
This document explains how to save time during the process of applying multiple
applications patches, using the AD utilities ADMRGPCH and ADPATCH. It provides
general guidelines, and assumes that the user will READ ALL README FILES to
ensure that all prerequisites are applied and all special instructions are
followed. It assumes that the user has experience applying patches with
ADPATCH and can troubleshoot problems when they arise.
I. BENEFITS
II. ADMRGPCH Explained
III. ADPATCH in Non-Interactive Mode
IV. APPENDICES
APPENDIX A - Patch Format Reference
APPENDIX B - Advanced Time Saving Techniques
Important Note:
**At the time of creation of this document, the latest AD executable fixes
are in the Patch 1627493. It is recommended that the user apply this
patch (or any subsequent ones) before attempting the procedures below.**
I. BENEFITS of this procedure:
>>This method allows the Applications System Administrator or DBA to:
A. Apply multiple patches during one session of ADPATCH using ADMRGPCH.
B. Supply ADPATCH with parameters that force it into noninteractive mode.
Noninteractive mode provides the following benefits:
1. Automatic connection to the database the user puts in one command
and ADPATCH connects to the database without prompting for input on:
APPL_TOP verification
ORACLE_HOME verification
SYSTEM password
APPS password
etc....
2. Automatic detection of all driver files in a patch. In other words,
ADPATCH runs to completion without having to enter each driver file
for a specific patch. It automatically runs all of the drivers in
the specified patch directory.
C. In combination, these two executables make it possible to merge
multiple applications patches into one or two large patches which can
then be run to completion with one command.
II. ADMRGPCH EXPLAINED
AD Merge Patch (admrgpch) is a utility that is designed to merge multiple
1
AutoPatch compatible patches into a single integrated patch. It is an
executable located in the bin directory of AD_TOP. To merge two or more
patches into a single integrated patch, run admrgpch with the following
arguments:
For NT users:
C:\> admrgpch <source directory> <destination directory>
The <source directory> is the directory in which the patches to merge have
been unloaded. The patches to merge must be formatted exactly as described
in the PatchFormat section of Chapter 4 (Appended to this document-
APPENDIX A). The <destination directory> is the directory in which
admrgpch will create the merged patch.
Actions in the merged patches are grouped by product then by patch number.
Comments in the merged readme.txt are also ordered by product then by patch
number.
After admrgpch runs, you should check the admrgpch.log file for errors.
The file is located in your APPL_TOP in the log directory under admin. If
you do not find any errors, look in the readme.txt file in the destination
directory for instructions on applying the merged patch using AutoPatch.
For example:
b. For NT users:
adpatch defaultsfile=%APPL_TOP%\admin\testdb1\def.txt
2. Run AutoPatch up to the point where it asks you for the directory
where your Oracle Applications patch has been unloaded. Then type
’abort’ at this prompt.
2
1. Applying a Single Patch Driver File
It is possible to apply just a single patch driver file
non-interactively using AutoPatch. Here is an example.
a. For UNIX users:
adpatch defaultsfile=$APPL_TOP/admin/testdb1/def.txt
logfile=123456.log \
patchtop=$APPL_TOP/patch/123456 driver=c123456.drv workers=3 \
interactive=no
b. For NT users:
adpatch defaultsfile=%APPL_TOP%\admin\testdb1\def.txt
logfile=123456.log \
patchtop=%APPL_TOP%\patch\123456 driver=c123456.drv workers=3 \
interactive=no
TIP: You could also turn off the "validate schemas" feature at the
same time by using the command line.
For UNIX users:
adpatch defaultsfile=$APPL_TOP/admin/testdb1/def.txt
logfile=123456.log \
patchtop=$APPL_TOP/patch/123456 driver=c123456.drv workers=3
interactive=no \
options=novalidate
For NT users:
adpatch defaultsfile=%APPL_TOP%\admin\testdb1\def.txt
logfile=123456.log \
patchtop=%APPL_TOP%\patch\123456 driver=c123456.drv workers=3
interactive=no \
options=novalidate
This is a good idea if you have run AutoPatch a few times in the
current environment and do not expect your current set of Oracle
Applications schemas or their passwords to change. As it takes time to
connect to each schema, omitting this step makes AutoPatch run faster.
2. Applying a Standard Patch
To apply a standard patch to your APPL_TOP and database
noninteractively:
Specify patchtop=<value> on the AutoPatch command line. The patch top
value must end in a 6to8digit number. For example,
patchtop=$APPL_TOP/patch/123456. Or, for NT,
patchtop=%APPL_TOP%\patch\123456.
Do not specify driver=<value> on the AutoPatch command line.
AutoPatch assumes the patch being applied is a standard patch, and it
attempts to run the standard patch driver files in the standard order
without prompting you for the patch driver file names.
AutoPatch looks for c<patchnum>.drv, d<patchnum>.drv, and
g<patchnum>.drv.
All other drivers must be run using the nonstandard method described
in the next section: Applying a Nonstandard Patch (<read this section
for patches created by admrgpch).
In this example, the AutoPatch command would be:
a. For UNIX users:
adpatch defaultsfile=$APPL_TOP/admin/testdb1/def.txt \
logfile=patch123456.log patchtop=$APPL_TOP/patch/123456 workers=3 \
interactive=no
3
b. For NT users:
adpatch defaultsfile=%APPL_TOP%\admin\testdb1\def.txt \
logfile=patch123456.log patchtop=%APPL_TOP%\patch\123456 workers=3 \
interactive=no
For example, suppose you want AutoPatch to apply the following patch
driver files in the order specified:
- my_drv1.drv (copy driver)
- my_drv3.drv (database driver)
- my_drv2.drv (generate driver)
driver=my_drv1.drvc,my_drv3.drvd,my_drv2.drvg
AutoPatch runs my_drv1.drv first, my_drv3.drv second, and my_drv2.drv
last (because that is the order you specified).
Here is the command line you would use to restart in our example:
a. For UNIX users:
adpatch defaultsfile=$APPL_TOP/admin/testdb1/def.txt \
4
logfile=123456.log patchtop=$APPL_TOP/patch/123456
driver=c123456.drv \
workers=3 interactive=no restart=yes
b. For NT users:
adpatch defaultsfile=%APPL_TOP%\admin\testdb1\def.txt \
logfile=123456.log patchtop=%APPL_TOP%\patch\123456 \
driver=c123456.drv workers=3 interactive=no restart=yes
IV. APPENDICES
APPENDIX A - Patch Format Reference
Patches generally consist of a top-level directory, several files in the
top-level directory, and one or more subdirectories. The top-level
directory is usually named <patchnum>, where <patchnum> corresponds to the
Oracle Bug Database number for the patch.
The readme.txt file contains general information about the patch. It may
describe manual steps that you must perform as part of fixing the problem,
and usually indicates on what servers you must run this patch. For example,
if the patch updates Applications forms, you must run it on all forms
servers.
The c<patchnum>.drv file contains commands for copying files and linking
executables. You use AutoPatch to apply the file portion of the patch
(unless the readme.txt says otherwise). The file portion of the patch
changes your Oracle Applications files. In a multi-server environment, you
should run this patch driver on all servers containing one or more of the
files being replaced by the patch or, if in doubt, apply the patch on all
servers.
You run the file d<patchnum>.drv using AutoPatch to apply the database
portion of the bug patch. The database portion of the patch changes your
Oracle Applications database objects. A d<patchnum>.drv file is only
included if the patch requires changes to your Oracle Applications
database objects, and if these changes can be easily automated. You must
successfully run c<patchnum>.drv, using AutoPatch before running
d<patchnum>.drv. This driver file should only be run on your administration
server.
Note: After you run the d<patchnum>.drv, check for invalid objects in the
database. If there are invalid objects, run the Compile Apps Schema
option from AD Administration before you run the g<patchnum>.drv.
Failure to do so may cause the g<patchnum>.drv to fail.
The g<patchnum>.drv file contains generation steps, and must be run after
the file and database portions of the patch have been run. A
g<patchnum>.drv file is only included if the patch requires new forms,
reports, graphics, or message files to be generated. This driver file may
need to be applied on your forms servers and/or concurrent processing
servers. The subdirectories under the top-level directory contain files
that are copied to your Oracle Applications directory structure.
5
WARNING: Patches must always be applied in their entirety. If
you apply a patch to update your filesystem, you must also apply
the corresponding database and generation portions of the patch
if they are included. When updating the filesystem in a
multi-server environment, you should apply the patch on all
servers.
README.txt
readme.txt Details
The readme.txt entry for a single patch lists:
Each patch entry starts with a line giving the bug number and product that
the patch fixes. For example:
oooooooooooooooooooooooo
o o
o BUG fnd 691976 o
o o
oooooooooooooooooooooooo
Patch Description:
A description of what the patch does. It may list the files included in
the patch, and on what servers the patch is to be applied.
Special Instructions
A description of manual steps you must perform. Most patches do not
require any manual steps.
The patch drivers should be run with AutoPatch in the following order:
1. c<patchnum>.drv
2. d<patchnum>.drv
3. g<patchnum>.drv
Always check the readme.txt file for the correct order in running patch
drivers. Many patches do not have database (d<patchnum>.drv) or generation
(g<patchnum>.drv) driver files. You should only try to run the database
and/or generation driver files if they exist.
Integrated Patches
If the patch you are applying has prerequisite fixes, Oracle ships you an
integrated patch containing both the specific patch you requested and all
prerequisite patches. In this case, you may find multiple entries in your
readme.txt—one entry for each bug included in the patch.
This can be accomplished with many different shell scripts. However, the most
straightforward and simple involves a file calling adpatch multiple times. For
example, to run 1720516 and 1729676 in order, create a file called multi.sh that
contains the following two UNIX command lines (obviously, this assumes that the
patches reside in the patchtop directory already) :
simply run the script from the command line. One tip is name the logfiles
differently for each patch, so in case of an error you can easily determine
which patch failed. The last log file in the directory is the patch that
failed. To restart a multi.sh file, you would need to comment out or delete the
lines that precede the patch that failed, then simply add restart=y after fixing
6
the problem . Please read section III above for more information on restarting
non-interactive patches.
The UNIX "nohup" command is a very valuable way to save time. This command
allows adpatch to continue when started from a session, even when the session
is disconnected. In other words, a user can use nohup to dialin to the system,
start a multi.sh file and disconnect from the system immediately. This allows
for a much more efficient use of time.
To run multi.sh above with nohup, simply type the following at the UNIX command
prompt:
$nohup multi.sh
Nohup will put a file named nohup.out in the directory where you type the
command. This echoes what would normally be seen on the screen.
If the patch is in the c-driver phase, there will be no worker status available.
To determine if the patch is still running find the log file for the patch that
is running and use the tail -f command on the log. For example:
$tail -f 1729676.log
This command will echo any updates to the log file to the screen. This is a
good way to determine or monitor the progress of any nohup patch if you are
connected to the server.