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 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.

Please share this post Share on Facebook0Share on Google+0Share on LinkedIn0Share on Reddit0Tweet about this on Twitter

Gokhan Atil is a database administrator who has hands-on experience with both RDBMS and noSQL databases (Oracle, PostgreSQL, Microsoft SQL Server, Sybase IQ, MySQL, Cassandra, MongoDB and ElasticSearch), and strong background on software development. He is certified as Oracle Certified Professional (OCP) and is awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for his continuous contributions to the Oracle users community.

8 Comments

  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

    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

      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 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;

    • Gokhan Atil

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

  4. Gurinder Singh Wadhwa

    Hi,

    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. Required fields are marked *