Wednesday, February 28, 2018

How to Attach ORACLE_HOME and Recreate Central Inventory(oraInventory) In RDBMS Homes

[oracle@oracledbprod-ro oracle]$ pwd
/u01/oracle
[oracle@oracledbprod-ro oracle]$ cp -r oraInventory oraInventory_28Feb2018

[oracle@oracledbprod-ro bin]$ cd $ORACLE_HOME/oui/bin
[oracle@oracledbprod-ro bin]$ ls -ltr attachHome.sh
-rwxr-x--- 1 oracle oinstall 298 Apr 10  2012 attachHome.sh
[oracle@oracledbprod-ro bin]$ ./attachHome.sh &
[1] 28599
[oracle@oracledbprod-ro bin]$ ./attachHome.sh: line 5: cd: /u01/oracle/software/product/11.2.3/test/oui/bin: No such file or directory
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 32763 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/oracle/oraInventory
'AttachHome' was successful.

[1]+  Done                    ./attachHome.sh



[oracle@oracledbprod-ro bin]$ $ORACLE_HOME/OPatch/opatch lsinventory -all
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/software/product/11.2.3/devro
Central Inventory : /u01/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/software/product/11.2.3/devro/cfgtoollogs/opatch/opatch2018-02-28_06-28-43AM.log

List of Homes on this system:

  Home name= OraDb11g_home1, Location= "/u01/oracle/software/product/11.2.0/test"
  Home name= OraDb11g_home2, Location= "/u01/oracle/software/product/11.2.0/oracle"
  Home name= OraDb11g_home3, Location= "/u01/oracle/software/product/11.2.3/infra"
  Home name= OraDb11g_home4, Location= "/u01/oracle/software/product/11.2.3/oracle"
  Home name= OraDb11g_home6, Location= "/u01/oracle/software/product/112035/oracle"
  Home name= OraDb11g_home7, Location= "/u04/oracle/software/product/11.2.0.4"
  Home name= OraHome1, Location= "/u01/oracle/ogghome/12.2"
  Home name= OraDb11g_home5, Location= "/u01/oracle/software/product/11.2.3/test"
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo



[oracle@oracledbprod-ro bin]$ more /etc/oraInst.loc
inventory_loc=/u01/oracle/oraInventory
inst_group=oinstall


[oracle@oracledbprod-ro bin]$ echo $ORACLE_HOME
/u01/oracle/software/product/11.2.3/devro
[oracle@oracledbprod-ro bin]$ echo $ORACLE_HOME_NAME

[oracle@oracledbprod-ro bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/oracle/software/product/11.2.3/devr                                o" ORACLE_HOME_NAME="devro"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 32763 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/oracle/oraInventory
'AttachHome' was successful.
[oracle@oracledbprod-ro bin]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/software/product/11.2.3/devro
Central Inventory : /u01/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/software/product/11.2.3/devro/cfgtoollogs/opatch/opatch2018-02-28_06-35-07AM.log

Lsinventory Output file location : /u01/oracle/software/product/11.2.3/devro/cfgtoollogs/opatch/lsinv/lsinventory2018-02-28_06-35-07AM.t                                xt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.3.0
There are 1 products installed in this Oracle Home.


Installed Products (124):

Agent Required Support Files                                         10.2.0.4.3
Assistant Common Files                                               11.2.0.3.0
Bali Share                                                           1.1.18.0.0
Buildtools Common Files                                              11.2.0.3.0
Character Set Migration Utility                                      11.2.0.3.0

Local VCN Peering (Using LPGs) vs Remote Peering

   Technical Architecture 1. Local VCN Peering (LPGs): Uses Local Peering Gateways to connect two VCNs within the same region -  Think of...