How Enterprise Manager Detects the Version of Oracle Databases

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 database, the exact version of your database becomes 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

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, it runs the following query:

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

If the target database version is greater than or equal to, 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.

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.


  1. Eric

    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

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

  2. Paul


    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.


    • Gokhan Atil

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

  3. Steve

    The 12c should be updated to something like:

    (SELECT version || ‘.’ || bundle_id version
    FROM dba_registry_sqlpatch
    WHERE rownum = 1),
    (SELECT version FROM v$instance)) version
    FROM dual;

    • Gokhan Atil

      Yes Steve, you’re probably right. Thanks for sharing.

  4. Gurinder Singh Wadhwa


    Is there any way, we can see applied PSU in Cloud COntrol 12c ?

    As mentioned above, that this will be shown in 13c, is there any patch whihc we can apply to OMS/ agent to use new sql queries to extract DB Version along with PSU.

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.