程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> 重新發現Oracle太美之oraInst.loc

重新發現Oracle太美之oraInst.loc

編輯:Oracle教程

重新發現Oracle太美之oraInst.loc

平台操作系統版本神馬的,聰明人一看就知道了,我就不多碼字了!

oracle@rh64 oraInventory]$ opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/db11g/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory =====>>>可以看到這是個Central Inventory
from : /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc =====>>>可以看到這是個Oracle Home Inventory
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-05-15_00-33-12AM_1.log

Lsinventory Output file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2014-05-15_00-33-12AM.txt

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

Oracle Database 11g 11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.

Interim patches (1) :

Patch 18031668 : applied on Wed May 14 03:28:24 CST 2014
Unique Patch ID: 17255543
Patch description: "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Created on 20 Feb 2014, 05:15:58 hrs PST8PDT
Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
Bugs fixed:
17288409, 16399083, 17205719, 17811429, 10136473, 16472716, 17614227
17050888, 17040764, 17865671, 17325413, 14010183, 17726838, 13364795
17389192, 17612828, 17080436, 16613964, 17284817, 17441661, 17761775
17721717, 16721594, 17390431, 18203837, 17551709, 17344412, 16043574
17446237, 16863422, 18139690, 17071721, 17501491, 17610798, 17239687
17752121, 17468141, 17602269, 18203835, 17375354, 17313525, 17811456
16731148, 14133975, 18203838, 16956380, 17385178, 17235750, 13866822
17394950, 17478514, 17027426, 12905058, 14338435, 16450169, 13944971
18094246, 16929165, 16785708, 17265217, 17465741, 16220077, 16180763
16069901, 17546973, 16285691, 17323222, 18180390, 17088068, 16875449
17016369, 17443671, 16228604, 17811438, 17811447, 16837842, 18031668
16912439, 17332800, 17393683, 17622427, 17545847, 17186905, 16943711
16850630, 17082359, 17346671, 14852021, 17783588, 17437634, 16618694
17341326, 17296856, 17546761, 17716305

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

OPatch succeeded.
============>>>補丁已經打到了11.2.0.4.2,下面是oraInst.loc中的內容:
1.Central Inventory中的oraInst.loc
[oracle@rh64 oraInventory]$ cat /u01/app/oraInventory/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
2. ORACLE_HOME下的oraInst.loc
[oracle@rh64 oraInventory]$ echo $ORACLE_HOME
/u01/app/db11g/product/11.2.0/dbhome_1
[oracle@rh64 oraInventory]$ cat /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
3. /etc下面的oraInst.loc =====>>>Central Inventory Pointer File
[oracle@rh64 oraInventory]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

注意:可見上面三個文件都是一樣的內容,都是第一行注冊目錄的位置,第二行為宿主。注意如果你通過新裝軟件的方式來升級數據庫,如果ORACLE的基
目錄有所改變,要記得同時修改這三個文件。以免使用OPatch的時候報錯。

在oracle官方文檔的Oracle? Universal Installer and OPatch User's Guide 11g Release 2 (11.2) for Windows and UNIX有詳細描述.
Oracle Universal Installer Inventory的注冊目錄有如下三個:
1> Central Inventory Pointer File
2> Central Inventory
3> Oracle Home Inventory

1> Central Inventory Pointer File
每一個oracle軟件安裝都會有它自己的Central Inventory pointer file
Table 2-2 Default Inventory Pointer File Locations

Platform Default Inventory Pointer Location
Linux Linux.PPC64 AIX /etc/oraInst.loc
Solaris.SPARC Solaris.X64 HPUX HPIA HP.TRU64 Linux.IA64 Linux.xSeries /var/opt/oracle/oraInst.loc
Windows Windows.X64 Windows.IA64 HKEY_LOCAL_MACHINE/Software/Oracle/inst.loc

In UNIX, if you do not want to use the Central Inventory located in the directory specified by the inventory pointer file, you can use the -invPtrLoc flag to specify another inventory pointer file. The syntax is as follows:

./runInstaller -silent -invPtrLoc <Location_of_oraInst.loc> ORACLE_
HOME="<Location_of_Oracle_Home>"

2> Central Inventory
Central Inventory包含了在一個主機上安裝的所有Oracle軟件產品的信息。
這個下面包括Inventory File,Logs Directory
Oracle強烈建議不要手工修改這下面的inventory.xml,否則會造成產品安裝或者patch的時候出現問題。

3> Oracle Home Inventory
包括Components File,Home Properties File,Other Folders

如何創建Central Inventory?(見官檔)
./runInstaller -silent -attachHome ORACLE_HOME="<Oracle_Home_Location>"
"CLUSTER_NODES={<node1,node2>}" LOCAL_NODE="<node_name>"
如何創建Removing the Central Inventory?(見官檔)

總結:
這個東西我現在感覺就是在安裝或者打補丁的時候,還有clone軟件的時候,從別的地方tar過來軟件的時候,這三個文件需要注意,
另外意外丟失如何重建也可能會遇到。當然還有一些其他的日志信息可供參考的,沒啥難得,看看就好

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved