Applying one-off interim patch of Oracle using OPATCH utility:
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.
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
:= -help Displays the help message for the command.
-report Print the actions without executing.
‘opatch apply -help’
‘opatch lsinventory -help’
‘opatch napply -help’
‘opatch nrollback -help’
‘opatch rollback -help’
‘opatch prereq -help’
‘opatch util -help’
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.
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.
How to rollback one-off interim patch whenever find problem:
$ opatch rollback /u01/patch/8708077
$ OPatch/opatch rollback -id
For more detail and troubleshooting of opatch please refer oracle documentation or wait to publish another post.
When you want to make a strong Oracle DBA career then you should be aware of database services and other database technology. Without having knowledge of Oracle internals, Oracle performance tuning, and skill of Oracle database troubleshooting you can’t be an Oracle DBA expert.
This expert DBA Team club blog always provides you latest technology news and database news to keep yourself up to date. You should need to be aware of Cloud database technology like DBaaS. All Oracle DBA tips are available in a single unique resource at our orageek. Meanwhile, we are also providing some sql tutorials for Oracle DBA. This is the part of Dbametrix Group and you would enjoy more advanced topics from our partner resource.