Tuesday, October 23, 2012

Finding updated Oracle PSU (Patch Set Update) Version

Patch Set Updates are referenced by their 5-place version number.

The following OPatch commands are used to determine the latest PSU installed in the Oracle Home.

1. Database PSUs

use this command

opatch lsinventory -bugs_fixed | egrep -i 'PSU|DATABASE PATCH SET UPDATE'


opatch lsinventory -bugs_fixed | grep -i 'TRACKING BUG' | grep -i 'PSU'

3. GI (Grid Infrastructure) PSUs

opatch lsinventory -bugs_fixed | grep -i 'GRID INFRASTRUCTURE PATCH SET UPDATE'

For Windows Users:
In the following commands for Enterprise Manager PSUs, use findstr /i instead of grep -i.

4. Enterprise Manager Agent PSUs

opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER' | grep -i 'AGENT'

5. Enterprise Manager OMS PSUs

opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER' | grep -i 'OMS'

6. WebLogic Server 

$ . $WL_HOME/server/bin/SetWLSEnv.sh 
$ java weblogic.version

wL_HOME is the path of the WebLogic home:

You can also use the SQL to view the PSU information as below

SQL> select * from dba_registry_history;

ACTION_TIME                                                                 ACTION                      NAMESPACE                         VERSION                 ID BUNDLE_SERIES                  COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ --------------- ---------- ------------------------------ -----------------------------------------------
13-SEP-11 PM                                                APPLY                       SERVER                           0 PSU                            Patchset
10-NOV-11 AM                                                APPLY                       SERVER                           3 PSU                            PSU

How to check my OPatch version

log-in as oracle user and type in the below mentioned command

$ORACLE_HOME/OPatch/opatch version

Commonly Used OPatch commands

$ 'opatch apply ...' is to apply a patch
$ 'opatch rollback ...' is to roll back a patch
$ 'opatch lsinventory' is to show inventory on an Oracle Home
$ 'opatch query ...' is to query a given patch from specific details
$ 'opatch version' is to show the version of the OPatch being used
$ 'opatch prereq ...' is to invoke some prerequiste checks
$ 'opatch util ...' is to invoke some independent utilities 

source : Oracle Documentation

1 comment:

  1. Very usefull ! Great ! Thank you