Central Inventory

How to Move Central Inventory

Move Central Inventory

Once you decided to move ORACLE HOME to a new place, you should consider to move the central inventory to another place before moving ORACLE HOME.

Our plan is to move the central inventory from /u01/app/oraInventory to /home/oracle/oraInventory. In addition, we then abandon the old place for good.

To move Oracle central inventory to another place, we take the following steps:

  1. Configure Inventory Location File
  2. Move All Inventory Files
  3. Update All Inventory Location Files
  4. Verify New Central Inventory

Configure Inventory Location File

Only root can modify the file.

[root@primary ~]# vi /etc/oraInst.loc

Move All Inventory Files

In this case, we use /home/oracle as our new central inventory. So we copy all inventory files to the new location like this.

[oracle@primary ~]$ cp -rp /u01/app/oraInventory /home/oracle/

Update All Inventory Location Files

There’re two more oraInst.loc in this OS. One is inside the central inventory, the other is at $ORACLE_HOME. Therefore, we need to overwrite them with the newly modified location file in order to be consistent across the OS.

[oracle@primary ~]$ cp /etc/oraInst.loc /home/oracle/oraInventory/oraInst.loc
[oracle@primary ~]$ cp /etc/oraInst.loc $ORACLE_HOME/oraInst.loc

Verify New Central Inventory

Let’s see the patching history for verifying the new central inventory.

[oracle@primary ~]$ mv /u01/app/oraInventory /u01/app/oraInventory-old
[oracle@primary ~]$ opatch lsinventory
Oracle Interim Patch Installer version
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : /oracle/ora11ghome
Central Inventory : /home/oracle/oraInventory
   from           : /oracle/ora11ghome/oraInst.loc

OPatch version    :
OUI version       :
Log file location : /oracle/ora11ghome/cfgtoollogs/opatch/opatch2019-01-22_19-55-36PM_1.log

Lsinventory Output file location : /oracle/ora11ghome/cfgtoollogs/opatch/lsinv/lsinventory2019-01-22_19-55-36PM.txt

Installed Top-level Products (1):

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

There are no Interim patches installed in this Oracle Home.


OPatch succeeded.

Good! The new central inventory is working now.

Please note that, orainstRoot.sh in central inventory is a file executed by root during post installation, which is mainly used to copy inventory location file from central inventory to /etc/ and then change both permission and group of central inventory. Although we have no need to use it after installation, for safety’s sake, we can modify the file and make sure everything points to the new location.

Leave a Reply

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