What About Database Patches?

 < Day Day Up > 



Database patches have traditionally been installed using runInstaller and applying the product.jar file that will bring the database to the correct version number. However, this is no longer always the case. Some database patches (those against databases at version 9i and above) are installed using a new utility called OPATCH. OPATCH, also known as "The Interim Patch Installer," is a new Oracle-supplied utility that is provided to assist you with the process of applying interim patches to the RDBMS binaries. This utility can only be used with database patches released for Oracle 9i Release 2 (database Version 9.2.0.#) or greater and so far only on Windows or UNIX OSs. OPATCH is a Perl-based utility that is applied to your database server as a patch itself that can be downloaded from Metalink. The patch number is 2617419 and even if it has been installed once, you should check every time you are ready to apply patches to see if there is a newer version available.

When attempting to apply a patch, OPATCH will detect any conflicts that may be relevant to your system and the interim patch that you are trying to apply. Not only will it detect the conflicts, it will report back to you what those conflicts are and that the patch will fail.

OPATCH Syntax

You can invoke OPATCH directly from the command line using the following syntax:

 <perl> <opatch.pl> <command> [<command_options>] [ -h[elp] ]  [ -n[o_op] ] 

If you are running on a UNIX system (or you are running on a Windows OS also running MKS Toolkit), you can invoke OPATCH through the supplied wrapper script that comes with the patch. Running the wrapper script requires that you set your Oracle_home correctly and that that version of the Oracle home has the appropriate version of the Perl interpreter. The wrappered OPATCH will then be invoked as follows:

 opatch <command>  [<command_options>]  [ -h[elp] ]  [ -n[o_op]  ] 

Table 10.3 shows the parameters available for the parameter list and the definition of those parameters.

Table 10.3: OPATCH Parameter List

Parameter

Definition

Perl

The Perl binary with a version of 5.6.0 or greater if this binary is not located in the default ORACLE_HOME.

opatch.pl

The patch script.

command

Any one of the following:

apply

  • lsinventory

  • rollback

  • version

command_options

Any option that may be supported by the command parameter.

-help

Displays help message for the command.

-no_op

Prints the actions without actually executing them.

UNIX:

 $/usr/local/bin/perl5.6 opatch.pl apply/patches/12345678 opatch apply/patches/133469 

Windows:

 C:\Perl\bin\perl5.6.0 opatch.pl apply F:\patches\12345678 

Removing an OPATCH Applied Patch

Not only can you apply a patch using OPATCH, you can unapply a patch the same way as well. The command to uninstall the interim database patch is as follows:

 rollback [ -id <patch id> ] [ -oh <OracleHome> ] [ -ph <patch dir> ] 

Table 10.4 shows the parameters for this command as well as the definition of the parameters.

Table 10.4: Rollback Parameters for OPATCH

Parameter

Definition

-id <patch id>

ID of the patch to be rolled back.

-oh

Alternative directory to use instead of the default of ORACLE_HOME.

-ph

Valid patch directory

Listing Currently Installed Interim Patch ID Numbers

The following command will list all interim patches that appear in the <SID> OraInventory directory:

 lsinventory [-all] [-oh <OracleHome>] 

Table 10.5 provides the parameters and definitions for the list command.

Table 10.5: Listing Installed Interim Patches Parameters

Parameter

Definition

-all

Tells the list command to report the name and installation directory for each ORACLE_HOME found based on oraInst.loc.

-oh

Alternative directory to use instead of the default of ORACLE_HOME.

The resulting report lists all of the installed items in alphabetical order along with their corresponding version numbers and associated base bug (if any) listed at the end of the report.

Listing OPATCH Version

To determine the version of the OPATCH utility that you are running, you will use the following command:

 OPATCH version 

OPATCH Online Help

OPATCH, like most utilities provided by Oracle, comes with online help options that you can display with the opatch.pl -help command. Optionally, you can add the option that you want help with (e.g., apply or rollback.)



 < Day Day Up > 



Oracle 11i E-Business Suite from the front lines
Oracle 11i E-Business Suite from the Front Lines
ISBN: 0849318610
EAN: 2147483647
Year: 2004
Pages: 122

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net