You know that patch numbering has been changed since November 2015, and the new format replaces the numeric 5th digit of the bundle version with a release date in the form “YYMMDD”. Let’s say you applied PSU 160719 to your 11.2.0.4 database, the exact version of your database becomes 11.2.0.4.160799. We also know that PSUs do not change the Oracle release version information that can be queried from v$version (Doc ID 861152.1), so when you query your database, you still see 11.2.0.4.0:

On the other hand, when you list your database targets on Oracle Enterprise Manager, it shows the exact version of Oracle Database.

I wondered how EM13c gets the information, and saw that it uses different queries depending on version of the target database. So first it queries v$version and then if the database version is lower than 11.2.0.2, it runs the following query:

If the database version is greater than or equal to 11.2.0.2, and lower than 12.1.0.2, then it runs the following query:

If the target database version is greater than or equal to 12.1.0.2, then it runs the following query:

I found it interesting so I wanted to share it. One day, if you need to get the exact version of your database (including PSU), it may be worth your while.

7 Responses to “How Enterprise Manager Detects the Version of Oracle Databases”

  1. Thank you for the posting this!

    Maybe this explains why the 5th digit is not showing up in EM for databases where I have applied a bundle patch?  bundle_series=DBBP

    I’ve yet to log a SR for this.  Anyone else experienced this or know of of a fix.

    • Gokhan Atil says:

      You are welcome. I do not know if DBBP creates different records on dba_registry_history. Let’s hear what Oracle Support says.

  2. Hi,

    I also found, that physical standby databases (mounted) don’t show their PSU level. If you open them read only it will discover the PSU. Makes sense to me.

    Paul

    • Gokhan Atil says:

      Yes Paul, exactly! The most dba_views are not accessible on recovery mode. This is why they detected with only v$version information.

  3. The 12c should be updated to something like:

    SELECT NVL(SELECT version FROM
    (SELECT version || ‘.’ || bundle_id version
    FROM dba_registry_sqlpatch
    WHERE BUNDLE_SERIES in (‘DBBP’,’PSU’)
    ORDER BY ACTION_TIME DESC)
    WHERE rownum = 1),
    (SELECT version FROM v$instance)) version
    FROM dual;

Leave a Reply

Your email address will not be published. Required fields are marked *