Oracle GI 11.2.0.1.0
Oracle db 11.2.0.1.0
Oracle Linux 5.6 x86-64
ASM standalone, NO RAC.
Background
For a few years now I’ve been using VMworkstation and (more recently) VirtualBox to create personal sandbox systems. These have all been somewhat generic, ‘right out of the box’ installations. Now I am trying to create sandbox versions of each of my 4 ‘live’ systems. I want these to be configured as closely as possible to match the corresponding live system. As a result I am paying much more attention to all the details.
To assist in this effort I wrote a script to report on the current state of the inventory. This script does the following
- Extract the inventory location from /etc/oraInst.loc
- From the indicated location, parse ../contentsXML/inventory.xml to get the names and locations of all installed oracle homes
- Use the parsed information to generate a secondary script that will report on each home, then execute that secondary sript.
The secondary script typically looks like this:
echo ========================
echo HOST: `hostname`
echo
echo HOME NAME: Ora11g_gridinfrahome1 IDX: 1
echo
ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
echo ---- oratab usage ----
grep $ORACLE_HOME: /etc/oratab
echo --------
$ORACLE_HOME/OPatch/opatch lsinventory
echo ========================
echo HOST: `hostname`
echo
echo HOME NAME: OraDb11g_home1 IDX: 2
echo
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
echo ---- oratab usage ----
grep $ORACLE_HOME: /etc/oratab
echo --------
$ORACLE_HOME/OPatch/opatch lsinventory
The literals for HOME NAME, IDX, and ORACLE_HOME were extracted from the inventory.xml file. The exact values, and the number of homes reported will obviously depend on the contents of inventory.xml, and that is the point of the script. I can drop it on any of my linux servers, as the script itself is driven by the inventory on that server.
Issue
Now, when I run this on a newly created sandbox which has two homes – one ASM and one db, I see this output from the ‘opatch lsinventory’. Pay attention to the "central inventory ... from " information.
Oracle Home : /u01/app/oracle/product/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
.
.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
And as a point of reference:
oracle:orcl$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
While I’ve never paid close attention to those lines from lsinventory before, the above is what I’d expect from a position of relative ignorance on these details.
But if from a live server, with the same starting point:
oracle:orcl$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
I get
Oracle Home : /u01/app/oracle/product/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/grid/oraInst.loc.
.
.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
So, on the new sandbox, it seems that lsinventory started its search at /etc/oraInst.loc, while on the live system it started at $ORACLE_HOME/oraInst.loc. Both ended up at the same place, but I don’t understand the mechanism that indicated a different starting point on the two systems.
Perhaps I’m obsessing over a nit, but I’d really like to understand the difference.