Doc ID: Note:189489.1
Subject: Oracle9i Data Server Interim Patch Installation (OPatch)
Type: BULLETIN
Status: PUBLISHED
Content Type: TEXT/X-HTML
Creation Date: 14-MAY-2002
Last Revision Date: 22-NOV-2004
Oracle9i Data Server Interim Patch Installation
Interim (One-Off) Patches
The Interim Patch Installer
Patch Conflict Detection and Resolution
OPatch Syntax
Applying an Interim Patch
Removing a Previously Applied Interim Patch
Listing What is Currently Installed on a System, Including Interim Patch Id Numbers
Listing Which Version of OPatch is Being Used
OPatch Online Help
Troubleshooting
Interim (One-Off) Patches
An Interim Patch (formerly known as a “one-off” patch) is a bug fix
(or set of fixes) made available to customers who for business reasons
cannot wait until the next Patch Set or new product release to get a fix.
Oracle may also recommend interim patches (such as security patches) to be
applied to your systems. Interim patches can only be applied to a
particular product version (base release or patch set). For example, an
interim patch created for 8.1.7.3 should NOT be installed on 8.1.7.2 or
8.1.7.4. All Interim Patches are included in a future (usually next) Patch
Set as well as the next product release.
An Interim Patch is tested by itself but no system regression testing is
done until it is included in the next Patch Set. Because of this, it is
highly recommended that all customers needing bug fixes wait for a Patch
Set or product release that includes the fix unless you are already on a
terminal patch set (such as 8.1.7.4).
By default, an Interim Patch does not include any other bug fixes made
since the previous Patch Set. Because of this, users installing multiple
Interim Patches compound risks to system stability with each additional
Interim Patch installed. For long term reliability customers should
install the next Patch Set that includes an Interim Patch as soon as
it becomes available.
Interim Patches are not cumulative. The fix in each Interim Patch is a
separate and unique branch off the base code line and does not
automatically include other fixes made since the last baseline. Oracle
does this to minimize the risk that a patch will have unexpected side
effects. Because of this it is possible that a particular Interim Patch
could cancel out a previously installed Interim Patch. Customers who have
already installed one or more Interim Patches who are requesting a new
Interim Patch must give Oracle Support a complete list of all Interim
Patches installed so that an Interim Merged Patch (a merge of all relevant
fixes installed by a customer) may be created if required. Customers
running Oracle Data Server release 9.2 or later can use the OPatch utility
to get the list of patches installed.
Before applying any patch to your system, please read the accompanying
patch README file. Follow any instructions appropriate for your environment.
The Interim Patch Installer
The Interim Patch Installer, OPatch, is an Oracle supplied utility to
assist with the process of applying interim patches to Oracle's database
software. It can only be used with Data Server Interim patches for
Oracle9i Release 2 (version 9.2) or greater.
OPatch currently supports Data Server Interim patches for Unix and Windows
platforms only. Data Server Interim patches for the IBM OS/390 platform
will not use the Interim Patch Installer in Oracle9i Release 2. In this
case, you must still manually apply the Interim patch.
OPatch supports:
* Applying an interim patch
* Rolling back the application of an interim patch
* Conflict resolution when applying an interim patch after previous
interim patches have been applied
* Reporting on installed products and Interim (One-Off) patch
Patches for Oracle9i Release 2 Data Server Interim patches include Opatch
with the interim patch. Patches for Oracle 9i Release 2 Patchset 1 (and
beyond) do not include OPatch. Currently, OPatch can be downloaded from
MetaLink (http://metalink.oracle.com) as patch 2617419. Even if you have
already installed OPatch on your system, before applying any patches,
check if newer versions of OPatch are available (as of July 2004 use the
10g version).
OPatch is a perl-based utility which uses Java Application Programming
Interfaces. OPatch was written based on perl 5.6, and while it can
successfully run with earlier versions, perl 5.6 is recommended. If you
do not currently have Perl on your system, please use one of the
following methods to obtain it:
* Perl is included in the Oracle9i Release 2 (9.2.0.1) CD distribution,
under APACHE. If you performed a 'Typical' installation of the Enterprise
Server, perl was automatically installed under the Apache directory. If you
have not performed a Typical installation, perl may be added by running the
installer and selecting HTTP Server under the 'Custom' installation.
* Download a script from MetaLink to install perl from the Oracle Server
CD. This script can be downloaded from MetaLink as patch 2417872. (NOTE:
this patch on NT/2000 includes all of Perl, whereas on other platforms it
does not)
* Download a self-contained version of perl available on MetaLink under
patch 2646235.
* Freeware versions of perl are available for download at
http://www.sunfreeware.com/programlistsparc8.html#perl (Solaris only) or
http://www.perl.com (all platforms).
Oracle recommends that you take the time now to prepare for any future
Interim patch installations. Please ensure that you have an appropriate
version of perl available on your system, either by installing it from the
Oracle9i Release 2 CD, or downloading it from one of the websites
mentioned above.
OPatch utilizes the same inventory as the Oracle Universal Installer (OUI).
The OPatch scripts are idempotent, that is running the scripts once will
have the same effect as running them many times. You can therefore rerun
the script if the initial run is interrupted. However, a partially
installed interim patch cannot be removed - the patch process must finish
successfully first.
Patch Conflict Detection and Resolution
The Interim Patch Installer will detect and report any conflicts found when
an attempt is made to apply an Interim patch that conflicts with a
previously applied interim patch. If such a conflict is found, the patch
application will fail. The -force option of opatch can be used to override
this failure. If -force is specified, the install will first rollback any
conflicting patches and then proceed with the installation of the desired
interim patch.
OPatch Syntax
OPatch can be invoked directly as:
[] [ -h[elp] ] [ -n[o_op] ]
or if you are on a Unix system you can use the supplied wrapper script. In
order to use the wrapper script you must set ORACLE_HOME appropriately for
your operating system, as the wrapper script will use the version of perl
installed in that ORACLE_HOME. You use the wrapper script to invoke OPatch
as follows:
opatch [] [ -h[elp] ]
where:
* is the perl binary with a version of 5.6.0 or greater
* is the patch perl script
* is one of the following:
apply
lsinventory
rollback
version
* are any options supported by
* -help displays the help message for the command
Examples:
Unix: /usr/local/bin/perl5.6 opatch.pl apply /patches/133469
opatch apply /patches/133469
NT: C:\Perl\bin\perl5.6.0 opatch.pl apply F:\patches\133469
Applying an Interim Patch
The OPatch apply command is used to apply a patch to a specified
$ORACLE_HOME on Unix and to a specified %ORACLE_HOME% on NT. OPatch
installs the patch into the user's $ORACLE_HOME by default on Unix
and %ORACLE_HOME% on NT, but this can be changed to another location
using the -oh argument. Apply uses the following syntax:
apply [ ] [-force] [-oh ]
where:
* is the location of the patch. If this is not supplied,
the patch is assumed to be in the current location.
* -oh is the directory to apply the interim patch to
instead of the default $ORACLE_HOME directory on Unix and
%ORACLE_HOME% on NT.
* -force causes a rollback of any conflicting patches before applying
the desired patch
The -force option should be used with care. If a conflict exists which
prevents the patch from being applied, it will remove any conflicting
patches before installing the current patch. This argument is needed
however if you are reinstalling the current patch.
The apply command tries to resolve any missing command line options. For
example on Unix, if $ORACLE_HOME is set but -oh is not supplied and
/patches/133469 is the directory where the patch resides, then the command:
/usr/local/bin/perl5.6 opatch.pl apply /patches/133469
will test /patches/133469 to see if it is a valid patch area. If it is
valid, the patch will be applied to the $ORACLE_HOME in the user's
environment.
On NT, if %ORACLE_HOME% is set but -oh is not supplied and
F:\patches\133469 is the directory where the patch resides, then the command:
C:\Perl\bin\Perl5.6.0 opatch.pl apply F:\patches\133469
will test F:\patches\133469 to see if it is a valid patch area. If it is
valid, the patch will be applied to the %ORACLE_HOME% in the user's
environment.
Removing a Previously Applied Interim Patch
The OPatch rollback command is used to remove an existing interim patch
from the appropriate ORACLE_HOME. It uses the following syntax:
rollback [ -id ] [ -oh ] [ -ph ]
where:
* -id is the reference id for the patch to be rolled back.
The OPatch lsinventory command will detail the patch id.
* -oh flags the directory to use instead of the default of ORACLE_HOME.
* -ph specfies the directory that is a valid patch area. The rollback
command will use the command types found in this directory to
identify what commands are to be used for the current operating
system.
By default, the rollback command will remove the specified interim patch
from the user's ORACLE_HOME unless the -oh flag is used.
The patch id and the patch directory must always be supplied.
Listing What is Currently Installed on a System, Including Interim
Patch Id Numbers
The OPatch lsinventory command will list the inventory for a particular
ORACLE_HOME or display all installations that can be found. It uses the
syntax:
lsinventory [-detail] [-all] [-oh ]
where:
* -detail reports all installed items in alphabetical order
* -all reports the name and installation directory for each
ORACLE_HOME found
* -oh specifies a directory to use instead of the
default ORACLE_HOME
The 'lsinventory -detail' will list all installed items in alphabetical
order, along with the corresponding version number. The installed interim
patches and their associated base-bug will be listed at the end of the
report. For example:
PRODUCT NAME VERSION
============ =======
Advanced Queueing (AQ) API 9.2.0.1.0
Advanced Replication 9.2.0.1.0
Agent Required Support Files 9.2.0.1.0
.
.
.
XML Transx 9.2.0.1.0
XSQL Servlet 9.2.0.1.0
Installed Patch List:
1313986 [ Base Bug(s): 762114 ]
Listing Which Version of OPatch is Being Used
The OPatch version command will report the version of OPatch being used.
This command does not have additional arguments.
OPatch Online Help
All OPatch commands have a -help option that will display the usage
details for that command. The help syntax is:
opatch.pl [ -h[elp] { [ apply | lsinventory | rollback | version ] }
Troubleshooting
A log of all OPatch actions and results is stored in the file:
Unix: $ORACLE_HOME/.patch_storage//
NT: %ORACLE_HOME%\.patch_storage\\
where:
* patch_id is the id of the interim patch
* logfile is the name of the file being used and is created with name of:
__.log
where action is "Apply" or "Rollback".
References
OPATCH FAILS BECAUSE FUSER IS NOT AVAILABLE
Opatch error: Can't call method build_option_details on an undefined value at perl_modules/Apply.pm line 3831
OPatch FA .
Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved.
Legal Notices and Terms of Use.