Re: version including the PSU patch level

  • From: Ron Chennells <ron.chennells@xxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 26 Oct 2010 20:36:10 +0100

Quoting "Terrian, Thomas J Mr CTR DLA J6DIB" <Tom.Terrian.ctr@xxxxxxx>:

Does anyone know how to determine the patch level of a database including
the PSU level.  v$version shows 10.2.0.4.0 but I know we applied the PSU
10.2.0.4.4....

(I would rather not run opatch lsinventory and then look up the patch
number)

Thanks,
Tom


Here's a little script and some "metadata" that I wrote a while ago
to do this.

------------------------Start script--------------------------
#!/bin/ksh
#
# Match patch id from opatch with lookup table to produce more descriptive details on patches
#
#
if whence opatch >/dev/null
then
    # Get the patch id
opatch lsinventory | grep '^Patch [0-9]' | awk '{ print $2 }' | sort -n > /tmp/opatch.$$
    echo "Installed Patches  currently in the lookup table"
    echo
    # Join patch id with lookup table
    join /tmp/opatch.$$  patch_table
    echo
    echo "Installed Patches NOT currently in the lookup table"
    echo
    # List patches that we don't have a description for
    join -v 1 /tmp/opatch.$$  patch_table
    rm /tmp/opatch.$$
else
   echo "No opatch in PATH"
   exit 1
fi
---------------------End script-------------------------


Contents of patch_table file referenced above

---------------------------------------------
8576156   10.2.0.4.1  Patch Set Update (PSU 1)
8833280   10.2.0.4.2  Patch Set Update (PSU 2)
8833297   11.1.0.7.1  Patch Set Update (PSU 1)
9119284   10.2.0.4.3  Patch Set Update (PSU 3)
9207257   11.1.0.7.2  CRS Patch Set Upadate (CRS PSU 2)
9209238   11.1.0.7.2  Patch Set Update (PSU 2)
9282414   10.2.0.5.3  EM Agent 9282414 (Unix) 9490898 (Windows) (PSU3)CRS
9294495   11.1.0.7.4  CRS Patch Set Update (PSU 4)includes July2010CPU
9352164   10.2.0.4.4  Patch Set Update (PSU 4)
9352179   11.1.0.7.3  Patch Set Update (PSU 3)
9654983   11.2.0.1.2  Patch Set Update (PSU 2)
9654987   11.1.0.7.4  Patch Set Update (PSU 4)
9655006 11.2.0.1.2 Patch Set Update (PSU 2) for Grid includes July2010CPU EM Grid Control
9672003   11.1.0.7.3  DST Patch overlay on (PSU 3 )
9786002   10.2.0.5.4  EM OMS 9786002 (Unix and Windows) (PSU4)



Test run not to useful on my current system though as there are no patches
--------------------------------------------------------------------------
oracle@rac1 dataguard]$ ./wpatch.sh
Installed Patches  currently in the lookup table


Installed Patches NOT currently in the lookup table



[oracle@rac1 dataguard]$ opatch lsinventory
Invoking OPatch 11.2.0.1.1

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


Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.1
OUI version       : 11.2.0.2.0
OUI location      : /u01/app/oracle/product/11.2.0/db_1/oui
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2010-10-26_20-28-51PM.log

Patch history file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2010-10-26_20-28-51PM.txt

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

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


There are no Interim patches installed in this Oracle Home.


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

OPatch succeeded.
[oracle@rac1 dataguard]$

Ron

--
//www.freelists.org/webpage/oracle-l


Other related posts: