Introduction to Opatch
Opatch is Oracle supplied utility .
OPatch is used for patching Oracle software.
OPatch is a java based utility that allow the application and rolling back of interim patches to an Oracle
product
The program has sub-commands that may take arguments.
Getting and using Opatch utility
OPatch is PLATFORM specific.
Release is based on Oracle Universal Installer version
The latest opatch utility can be downloaded via patch number 6880880 from My Oracle Support .
Downloaded Patch to be unzipped in OH , which will create a directory $ORACLE_HOME/Opatch
Execute the following command to verify the version
$ORACLE_HOME/Opatch/opatch version
Main functionality of Opatch
Applying the patch
Rollback the patch
Conflict check
Report the installed components and patches
Set PATH environment variable
Windows: set PATH=%ORACLE_HOME%/OPatch:%PATH%
Unix: export PATH=$ORACLE_HOME/OPatch:$PATH
Opatch prerequisite checks
Check ORACLE_HOME environment variable
Check for JRE / JDK
Check for Oracle Universal Installer and OPatch Version Compatibility
Checks for PERL( specific to 9i/10gR1 )
Check for Patch Applicable on Operating System
Check for System Space
Check for System Commands, which are used for system updates e.g. fuser , ar , ld …etc..
Architecture of Inventories
Inventory Pointer file
Default Location : /etc/oraInst.loc or /var/opt/oracle/oraInst.loc ( for most UNIX systems )
Gives the location of central inventory
Central Inventory
Location given by Inventory pointer file.
As per OFA architecture, $ORACLE_BASE/oraInventory
Critical File : - <central-inventory>/ContentsXML/inventory.xml
Provides information about Oracle installations present on system
On Windows : C:\Program Files\Oracle\Inventory
Local Inventory( Oracle Home inventory )
Location : $ORACLE_HOME/inventory
Critical File : - $ORACLE_HOME/inventory/ContentsXML/comps.xml
Contains list of installed components/interim patches in this particular Oracle Home
Environment variables used by OPatch
ORACLE_HOME : This variable must point to a valid Oracle Home and matches the value when that
Oracle Home was installed.
OPATCH_DEBUG: Setting this variable to "true" sets the log level to debug.
OPATCH_PLATFORM_ID : If this variable to set to some numeric value, then OPatch skips platform ID
check and assumes the platform ID to be the one specified here.
OPATCH_NO_FUSER: Setting this variable to "true" informs the OPatch to skip the check for active
executables.
PATH: This variable must have a valid Opatch utility location included in it.
Most common commands available with OPatch
$ 'opatch apply ...' is to apply a patch
$ 'opatch rollback ...' is to roll back a patch
$ 'opatch lsinventory' is to show inventory on an Oracle Home
$ 'opatch query ...' is to query a given patch from specific details
$ 'opatch version' is to show the version of the OPatch being used
$ 'opatch prereq ...' is to invoke some prerequiste checks
$ 'opatch util ...' is to invoke some independent utilities
Opatch –help
Opatch -help command : Invoking OPatch without arguments or with the 'help' sub-command returns
the list of valid sub-commands to the user:
Usage: opatch [ -help ] [ -r[eport] ] [ command ]
opatch –help apply
opatch –help lsinventory
opatch –help nappl
opatch –help nrollback
opatch –help rollback
opatch –help query
opatch –help version
opatch –help prereq
opatch –help util
No comments:
Post a Comment