Step by Step How To Recreate Central Inventory In RDBMS Homes


How to recreate oraInventory (Central Inventory) in RDBMS Homes if the central inventory is corrupted or lost?

STEP 1:

Locating the central inventory 

  •  The location of the central inventory can be found from the central inventory pointer.
  • The location of the central inventory can be found from the central inventory pointer can be found from the file /etc/oraInst.loc (AIX and Linux) or /var/opt/oracle/oraInst.loc (Platform specific)
  • If an oraInst.loc file does not exist, then create one as below with the following entries:

    inventory_loc=<location_for_oraInventory>
    inst_group=<name_of_group_for_installtion>

    Example:
    inventory_loc=/u01/oracle/oraInventory
    inst_group=oinstall

    Make sure that the Oracle Owner has proper permissions (755) on the location specified for the oraInventory.

STEP 2: 

Remove the Central inventory (if it exists)

Use the following command to rename the oraInventory (Unix/Linux)

$ mv oraInventory oraInventory_orig


STEP 4:

Attaching the Home for Oracle Database

Execute runInstaller with -attachHome option for Oracle Home.

% ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Name_Of _Oracle_Home>"


[ordnbtyi@shsdnbty01 121]$ cd $ORACLE_HOME/oui/bin
[ordnbtyi@shsdnbty01 bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/ordbnbtyi/dnbtyi/db/tech_st/121" ORACLE_HOME_NAME="OraDb11g2_home1"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 3071 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /ordbnbtyi/dnbtyi/oraInventory
'AttachHome' was successful.
[ordnbtyi@shsdnbty01 bin]$ opatch lsinventpry
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Syntax Error... Unrecognized Command or Option (lsinventpry): 1st argument must be one of the following:
   apply
   napply
   rollback
   nrollback
   lsinventory
   lsinv
   lspatches
   query
   util
   prereq
   version
   -help
   -help -fmw

Please use the option 'opatch  -help' to get correct syntax

OPatch failed with error code 14
[ordnbtyi@shsdnbty01 bin]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /ordbnbtyi/dnbtyi/db/tech_st/121
Central Inventory : /ordbnbtyi/dnbtyi/oraInventory
   from           : /ordbnbtyi/dnbtyi/db/tech_st/121/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /ordbnbtyi/dnbtyi/db/tech_st/121/cfgtoollogs/opatch/opatch2023-03-12_18-51-00PM_1.log

Lsinventory Output file location : /ordbnbtyi/dnbtyi/db/tech_st/121/cfgtoollogs/opatch/lsinv/lsinventory2023-03-12_18-51-00PM.txt

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

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


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.

Some time we need to detach first then attach the home again by using above command.


[ordnbtyi@shsdnbty01 bin]$ ./runInstaller -silent -ignoreSysPrereqs -detachHome ORACLE_HOME=$ORACLE_HOME
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 3071 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /ordbnbtyi/dnbtyi/oraInventory

For reference Oracle Metalink doc id : (556834.1)

Comments

Popular posts from this blog

How to drop index and before dropping it how to get the DDL.

PRVG-11250 : The check "RPM Package Manager database" was not performed because

ORA-00257:archiver error, connect internal only until freed

Verifying Daemon “Avahi-Daemon” Not Configured And Running …FAILED (PRVG-1360)

Linux OL7/RHEL7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm

SKIP DNS RESLOV.CONF CHECK DURING RAC CONFIGURATION

CPU Patch Analysis

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How To Manage Space of The FRA in the Oracle DB

How to write to a CSV file using Oracle SQL*Plus