Getting the Oracle Homes in a server from the oraInventory

The information contained in the oratab should always be updated, but it is not always reliable. If you want to know what Oracle installations you have in a server, better to get it from the Oracle Universal Installer or, if you want some shortcuts, do some grep magics inside the inventory with the shell.

The following diagram is a simplified structure of the inventory that shows what entries are present in the central inventory (one per server) and the local inventories (one per Oracle Home).

inventory_structureYou can use this simple function to get some content out of it, including the edition (that information is a step deeper in the local inventory).

HTH

The following two tabs change content below.

Ludovico

Oracle ACE Director and Principal Consultant at Trivadis
Ludovico is an Oracle ACE Director, frequent speaker and community contributor, working as Principal Consultant for Trivadis, the leading Oracle consulting firm in Switzerland and German-speaking Europe.

7 thoughts on “Getting the Oracle Homes in a server from the oraInventory

  1. Pingback: Getting the Oracle Homes in a server from the oraInventory - Ludovico Caldara - Blogs - triBLOG

  2. Great script.
    I added one small change to ignore detached/removed oracle homes.
    At line 11 when doing a grep for list of oracle homes:
    grep -v “REMOVED=\”T\””

    Regards,
    Mitja

  3. Great script
    I added a test to manage additional Cloud Control 12c agent plugins which interfere with script :
    if [ -f $comp_file ] ; then <= between line 18 and 19
    fi <= between line 47 and 48

  4. Raj, copy the definition of the function in a script and source it in your .bash_profile … then you should have your lsoh function available in your shell.

Leave a Reply

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

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