Oracle one-off patch or interim patch using opatch utility

December 22, 2009 | By

Applying one-off interim patch of Oracle using OPATCH utility:

Hi friends,

Today we are discussing about Oracle upgrade for applying interim or one-off patch. Interim patch or one-off patch is applied by Opatch utility.

Opatch utility is provided by Oracle itself. If Opatch utility doesn’t install or doesn’t find out in your ORACLE_HOME then you should require to download from Oracle Support site.

Oracle’s oneoff patch or interim patch is installed by Opatch only. For check weather opatch utility has been installed or not check following commands.

$ cd $ORACLE_HOME/OPatch
$ opatch -help
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.

Usage: opatch [ -help ] [ -r[eport] ] [ command ]

command := apply
lsinventory
napply
nrollback
rollback
query
version
prereq
util

:= -help Displays the help message for the command.
-report Print the actions without executing.

example:
‘opatch -help’
‘opatch apply -help’
‘opatch lsinventory -help’
‘opatch napply -help’
‘opatch nrollback -help’
‘opatch rollback -help’
‘opatch prereq -help’
‘opatch util -help’

OPatch succeeded.

For applying any interim or one-off patch please find easy steps.

1) set ORACLE_HOME environment variable.

$ export ORACLE_HOME=/home/oracle10g

2) set JAVA_HOME environment variable.
OPatch requires JDK 1.4 or higher to work properly. JRE is installed using JDK.

$ export JAVA_HOME=/home/jdk/bin/java

3) set proper lsinventory using Opatch using following command.

$ OPatch lsinventory

4) Go to unzipped directory of patch using following command.

cd $ORACLE_HOME/OPatch

5) apply interim or one-off patch of Oracle.

$ /opatch apply /u01/patch/8708077

It will be applied your given one-off interim patch.

Log file of Opatch utility of Oracle:

OPatch maintains logs for all apply, rollback, and lsInventory operations. The log files are located in /cfgtoollogs/opatch directory. Each log file will be tagged with the timestamp of the operation. Log files are named as opatch__.log. Each time OPatch is executed a new log file is created.

Sample:
opatch_09-22-2009_20-05-00.log

How to rollback one-off interim patch whenever find problem:

$ opatch rollback /u01/patch/8708077

OR

$ OPatch/opatch rollback -id

For more detail and troubleshooting of opatch please refer oracle documentation or wait to publish another post.

Thanks and regards,
Rajiv Shah
http://www.dbametrix.com
http://www.dbametrix.com/service.html

Be Sociable, Share!

Tags: , , , , , , , , , , , , , , ,

Category: blog, howto, oracle stuff

Comments are closed.