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 PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /ordbnbtyi/dnbtyi/oraInventory'AttachHome' was successful.[ordnbtyi@shsdnbty01 bin]$ opatch lsinventpryOracle Interim Patch Installer version 11.2.0.3.4Copyright (c) 2012, Oracle Corporation. All rights reserved.Syntax Error... Unrecognized Command or Option (lsinventpry): 1st argument must be one of the following:applynapplyrollbacknrollbacklsinventorylsinvlspatchesqueryutilprereqversion-help-help -fmwPlease use the option 'opatch -help' to get correct syntaxOPatch failed with error code 14[ordnbtyi@shsdnbty01 bin]$ opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.4Copyright (c) 2012, Oracle Corporation. All rights reserved.Oracle Home : /ordbnbtyi/dnbtyi/db/tech_st/121Central Inventory : /ordbnbtyi/dnbtyi/oraInventoryfrom : /ordbnbtyi/dnbtyi/db/tech_st/121/oraInst.locOPatch version : 11.2.0.3.4OUI version : 11.2.0.4.0Log file location : /ordbnbtyi/dnbtyi/db/tech_st/121/cfgtoollogs/opatch/opatch2023-03-12_18-51-00PM_1.logLsinventory 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.0There 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
Post a Comment