mercredi 2 novembre 2011

Oracle 11g: what is the oracle version and patches applied


To know what is the oracle version regardless the patch installed, you can use the following request under sqlplus :
sql> select * from v$version
If you need to know which patch has been installed on your database, it will be recommended to use the opatch utility located under the $ORACLE_BASE/11.2.0/OPatch directory :
$>./optach lsinventory
Invoking OPatch 11.1.0.6.6

Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/oracle/11.2.0
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.6
OUI version       : 11.2.0.1.0
OUI location      : /opt/oracle/11.2.0/oui
Log file location : /opt/oracle/11.2.0/cfgtoollogs/opatch/opatch2011-11-02_16-20-24PM.log

Patch history file: /opt/oracle/11.2.0/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /opt/oracle/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2011-11-02_16-20-24PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.1.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.