How to check which PSU is installed…if any

How to check which PSU is installed…if any

Oracle PSUs (Patch Set Updates) are referenced by their 5-place version number.  Unfortunately they do not change version numbers in the Oracle binaries, product banners and such though (see MOS 861152.1), so here’s how to identify which PSU your ORACLE_HOME is at…

Database Server:

To check the Oracle Home version:

$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i -E 'DATABASE PSU|DATABASE PATCH SET UPDATE'
$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | egrep -i 'DATABASE PSU|DATABASE PATCH SET UPDATE'

(The first command above being for Linux)

To check the registered database version (12c upwards):

COL comments    FOR A70
COL action_time FOR A30
COL action      FOR A12
COL version     FOR A30

-- Historical pre 12c info
SELECT comments, version, action, TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time
FROM   sys.registry$history
WHERE  comments like '%PSU%'
AND    action = 'APPLY'
UNION ALL 
-- 12c registry for sqlpatch
SELECT description, version, action, TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time
FROM   sys.dba_registry_sqlpatch
WHERE  description like 'Database PSU%'
AND    action = 'APPLY';

COMMENTS                                                               VERSION                        ACTION       ACTION_TIME
---------------------------------------------------------------------- ------------------------------ ------------ --------------------
PSU 11.2.0.4.6                                                         11.2.0.4                       APPLY        17-SEP-2015 12:44:28
PSU 11.2.0.4.8                                                         11.2.0.4                       APPLY        13-NOV-2015 18:59:25
OJVM PSU post-install                                                  11.2.0.4.5OJVMBP               APPLY        14-NOV-2015 02:36:28
Database PSU 12.1.0.2.160419, Oracle JavaVM Component (Apr2016)        12.1.0.2                       APPLY        27-MAR-2017 09:58:19
Database PSU 12.1.0.2.170418, Oracle JavaVM Component (APR2017)        12.1.0.2                       APPLY        04-JUL-2017 21:55:04

…and for pre-12c database versions:

COL comments    FOR A30
COL action_time FOR A30
COL action      FOR A12
COL version     FOR A30

SELECT comments, version, action, TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time
FROM   sys.registry$history
WHERE  comments LIKE '%PSU%'
AND    action = 'APPLY';
COMMENTS                       VERSION                        ACTION       ACTION_TIME
------------------------------ ------------------------------ ------------ ------------------------------
OJVM PSU post-install          11.2.0.4.5OJVMBP               APPLY        30-APR-2016 00:33:20
PSU 11.2.0.4.8                 11.2.0.4                       APPLY        30-APR-2016 00:55:29
PSU 11.2.0.4.161018            11.2.0.4                       APPLY        14-JUN-2017 09:53:53
OJVM PSU post-install          11.2.0.4.170117OJVMPSU         APPLY        14-JUN-2017 09:53:56
PSU 11.2.0.4.180417            11.2.0.4                       APPLY        17-JUL-2018 21:19:04
OJVM PSU post-install          11.2.0.4.180417OJVMPSU         APPLY        17-JUL-2018 21:21:30

The above views are populated when catbundle.sql is executed.

Grid Infrastructure:

$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i 'GIPSU'

Cluster Ready Services:

$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i 'TRACKING BUG' | grep -i 'PSU'

Enterprise Manager Agent:

$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER AGENT' | grep -i 'PSU'

Enterprise Manager OMS:

$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER OMS' | grep -i 'PSU'

WebLogic Server:

. $WLS_HOME/server/bin/setWLSEnv.sh
java weblogic.version|grep PSU

5 thoughts on “How to check which PSU is installed…if any

  1. Unfortunately this will not work for 11.2.0.4.6

    Is able to grep till 11.2.0.4.5, again deviation from standard. ugh. Even though 11.2.0.4.6 is installed. Oh well such is life

    $ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | egrep -i ‘DATABASE PSU|DATABASE PATCH SET UPDATE’
    19769489 19769489 Thu May 14 13:25:36 EDT 2015 DATABASE PATCH SET UPDATE 11.2.0.4.5 (INCLUDES CPU
    19121551 19121551 Thu May 14 13:25:10 EDT 2015 DATABASE PATCH SET UPDATE 11.2.0.4.4 (INCLUDES CPU
    18522509 18522509 Fri Nov 14 15:06:27 EST 2014 DATABASE PATCH SET UPDATE 11.2.0.4.3 (INCLUDES CPU
    18031668 18031668 Fri Nov 14 15:05:56 EST 2014 DATABASE PATCH SET UPDATE 11.2.0.4.2 (INCLUDES CPU
    17478514 17478514 Fri Nov 14 15:05:24 EST 2014 DATABASE PATCH SET UPDATE 11.2.0.4.1 (INCLUDES CPU

Leave a Reply to John J Cancel reply

Your e-mail address will not be published. Required fields are marked *