About Me.

My self Adinarayana working as Implementation Application DBA with advanced technologies like RAC/PCP,OID/SSO,DMZ,Exadata and Fusion Middleware i.e Demantra,Application Server,SOA,FMW,BPEL and UPK. Created this blog to share the useful information related to DBA and Application DBA Your comments and suggestions are most welcome. Disclaimer: Please note all the views and opinions expressed in this site are my own. It's not recommend to use the fixes/suggestions provided in this site directly in production instance, please test them before implementing.

Monday, July 22, 2013

opatch commands

apply
Installs an interim patch. Refer to "apply Command" for more information.
napply
Installs n number of patches (hence napply). Refer to "napply Command" for more information.
auto
Applies Oracle Clusterware patches. Refer to "auto Command" for more information.
lsinventory
Lists what is currently installed on the system. Refer to "lsinventory Command" for more information.
query
Queries a given patch for specific details. Refer to "query Command" for more information.
rollback
Removes an interim patch. Refer to "rollback Command" for more information.
version
Prints the current version of the patch tool. Refer to "version Command" for more information.


'opatch -help'
  'opatch auto -help'
  'opatch apply -help'
  'opatch lsinventory -help'
  'opatch napply -help'
  'opatch nrollback -help'
  'opatch rollback -help'
  'opatch prereq -help'
  'opatch util -help'

Applying Patch:
===============
Go to patch and fire the command

$ORACLE_HOME/OPatch/opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc

$ORACLE_HOME/OPatch/opatch napply -invPtrLoc $ORACLE_HOME/oraInst.loc



Patch Check
============
 $ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc |grep 13004894
 $ ORACLE_HOME/OPatch/opatch lsinventory -details|egrep "Patch of Oracle Application Server 10g"
 $ $ORACLE_HOME/OPatch/opatch lsinventory -detail -invPtrLoc $ORACLE_HOME/oraInst.loc | egrep 'Oracle Application Server 10g|Patch of Oracle Application Server 10g'

 $ORACLE_HOME/OPatch/opatch lsinventory -detail -invPtrLoc  $ORACLE_HOME/oraInst.loc | egrep 'Oracle Application Server 10g|Patch of Oracle Application Server 10g'

Conflict Check
===============

opatch prereq -invPtrLoc $ORACLE_HOME/oraInst.loc CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/12419378

$ORACLE_HOME/OPatch/opatch prereq -invPtrLoc $ORACLE_HOME/oraInst.loc CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/12419378

Patch Rollback
===============
bash-3.2$ opatch rollback -id 13004894


To find out if a patch is a rolling patch
=========================================
$ORACLE_HOME/OPatch/opatch query -is_rolling_patch 9343627/

Applied Patches with Homes & Updated files information
======================================================
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME

No comments:

Post a Comment