oracle INVENTORY 詳解

liuhaimiao發表於2016-11-09
          inventory是oracle安裝工具OUI用來管理oracle安裝目錄的。inventory裡註冊了某個ORACLE_HOME下安裝的資料庫的元件及其版本,存放的是oracle軟體安裝的目錄資訊。oracle資料庫軟體的升級、增刪元件,都需要使用inventory。oracle OUI會建立一個有oraInst.ora檔案指定的全域性inventory。
        oraInst.ora檔案所在的目錄:
           AIX 或 linux作業系統平臺:/etc/oraInst.ora
           HP UNIX或Solaris作業系統平臺/var/opt/oracle/oraInst.loc
        oraInst.ora檔案內容:
             [oracle@ora11g ~]$ cat /etc/oraInst.loc
             inventory_loc=/u01/app/oraInventory------oraInvetory所在目錄
             inst_group=oinstall
-----OUI安裝ORACLE的作業系統組

模擬手動建立全域性inventory

模擬資料庫的版本
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

刪除當前的oraInventory
[oracle@ora11g app]$ mv oraInventory/ /tmp

檢視當前系統狀態

[oracle@ora11g OPatch]$ ./opatch lsinventory
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/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2013-08-05_06-18-47AM.log

OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.

OPatch failed with error code 73

生成全域性inventory

[oracle@ora11g bin]$ ./attachHome.sh

 


    

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/223653/viewspace-2128117/,如需轉載,請註明出處,否則將追究法律責任。

相關文章