It may be required to identify the exact Oracle Database and Oracle CRS versions installed on any unix system.
The following commands can be executed as a root or Oracle user to identify the current CRS and Oracle Database versions in use on the system. Please ensure that the ORACLE_HOME and ORA_CRS_HOME environment variables are set correctly and the Oracle/CRS binaries are available in case if they are stored on shared storage, otherwise the commands will fail to provide results.
$] $ORA_CRS_HOME/bin/crsctl check crs
$] ORA_CRS_HOME/bin/crsctl query crs softwareversion
$] ORA_CRS_HOME/bin/crsctl query crs softwareversion
$] ORACLE_HOME/OPatch/opatch lsinventory
This is an example of the outputs to expect upon execution of the above commands in a Oracle RAC cluster. Note that the same 'opatch' command would be applicable for identifying the Database version in a Non-Oracle RAC environment.
$] $ORA_CRS_HOME/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
$] crsctl query crs softwareversion
CRS software version on node [rdgv240sol05] is [10.2.0.5.0]
$] crsctl query crs softwareversion rdgv240sol06
CRS software version on node [rdgv240sol06] is [10.2.0.5.0]
$] $ORACLE_HOME/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.4.9
Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/orahome
Central Inventory : /app/oracle/OraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.4.9
OUI version : 10.2.0.5.0
OUI location : /app/oracle/orahome/oui
Log file location : /app/oracle/orahome/cfgtoollogs/opatch/opatch2011-07-26_13-13-58PM.log
Patch history file: /app/oracle/orahome/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /app/oracle/orahome/cfgtoollogs/opatch/lsinv/lsinventory2011-07-26_13-13-58PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0
There are 2 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = rdgv240sol05
Remote node = rdgv240sol06
--------------------------------------------------------------------------------
OPatch succeeded.