sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

【案例】Oracle数据库inventory手动创建详细过程

时间:2016-10-17 13:58   来源:Oracle研究中心   作者:网络   点击:

天萃荷净 运维DBA反映在Oracle数据库升级时遇到inventory失败,通过手动创建oracle inventory来解决inventory异常问题。inventory目录手动创建,opatch遇到了inventory目录的问题,下面对inventory手动创建做了一点实验。

测试环境:OS RHEL 5.8 DB:10.2.0.5.10 RAC环境

1,使用命令手动创建

"LOC="/u01/app/oracle/product/10.2.0/crs" TYPE="O" IDX="1" CRS="true">

[oracle@rac2 ContentsXML]$  /u01/app/oracle/product/10.2.0/db/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/oracle/product/10.2.0/db ORACLE_HOME_NAME=OraDb10g_home1 CLUSTER_NODES=rac1,rac2 "INVENTORY_LOCATION=/u01/app/oracle/oraInventory"
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oracle/oraInventory
'AttachHome' was successful.
[oracle@rac2 ContentsXML]$ cat inventory.xml
< xml version="1.0" standalone="yes"  >

   10.2.0.5.0
   2.1.0.6.0

如果要创建集群中的所有节点的inventory,去掉-noClusterEnabled参数,如果有多个实例包括ASM,需要增加多次,注意ORACLE_HOME参数的值的不同。

下面是测试inventory目录是否创建成功,如果命令正常执行,说明成功。

[oracle@rac2 ContentsXML]$ cd /u01/app/oracle/product/10.2.0/db/OPatch
[oracle@rac2 OPatch]$ ./opatch lsinventory
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/10.2.0/db
Central Inventory : /u01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /u01/app/oracle/product/10.2.0/db/oui
Log file location : /u01/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2013-04-30_06-30-11AM.log

Patch history file: /u01/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2013-04-30_06-30-11AM.txt

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

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 4                            10.2.0.5.0
There are 2 products installed in this Oracle Home.


Interim patches (2) :

Patch  12419392     : applied on Sun Apr 28 21:35:38 CST 2013
Unique Patch ID:  13794201
   Created on 29 May 2011, 22:29:59 hrs PST8PDT
   Bugs fixed:
     6402302, 10269717, 10327190, 8865718, 10017048, 9024850, 8394351, 8546356
     9360157, 9770451, 9020537, 9772888, 8664189, 10091698, 12551710, 7519406
     10132870, 8771916, 9109487, 10173237, 10068982, 8350262, 11792865
     11724962, 11725006, 9184754, 8544696, 9320130, 7026523, 8277300, 9726739
     8412426, 12419392, 6651220, 9150282, 9659614, 9949948, 10327179, 8882576
     7612454, 9711859, 9714832, 10248542, 9952230, 9469117, 9952270, 8660422
     10324526, 12419258, 9713537, 10010310, 9390484, 9963497, 12551700
     12551701, 10249537, 12551702, 12551703, 8211733, 12551704, 9548269
     12551705, 12551706, 9337325, 12551707, 7602341, 12551708, 9308296
     10157402, 11737047

Patch  9952245      : applied on Sun Apr 28 06:25:54 CST 2013
Unique Patch ID:  13197883
   Created on 17 Jan 2011, 03:04:34 hrs PST8PDT
   Bugs fixed:
     9952245, 9879181, 9610672, 9872299, 9577921, 8308495, 9103966, 8996060
     6899183, 9261837, 8487143, 9646836



Rac system comprising of multiple nodes
  Local node = rac2
  Remote node = rac1

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

OPatch succeeded.

2,使用脚本创建


	[oracle@rac2 oracle]$ rm oraInventory -r
[oracle@rac2 oracle]$
[oracle@rac2 bin]$ pwd /u01/app/oracle/product/10.2.0/crs/oui/bin
[oracle@rac2 bin]$ ./attachHome.sh Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.
loc The inventory is located at /u01/app/oracle/oraInventory SEVERE:Remote 'AttachHome' failed on nodes: 'rac1'.
Refer to '/u01/app/oracle/oraInventory/logs/AttachHome2013-04-29_07-37-05PM.log' for details.
You can manually re-run the following command on the failed nodes after the installation: /u01/app/oracle/product/10.2.0/crs/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/oracle/product/10.2.0/crs ORACLE_HOME_NAME=OraCrs10g_home CLUSTER_NODES=rac1,rac2 CRS=true "INVENTORY_LOCATION=/u01/app/oracle/oraInventory" LOCAL_NODE=. 'AttachHome' failed.

[oracle@rac2 bin]$ cd $ORACLE_HOME/oui/bin
[oracle@rac2 bin]$ ./attachHome.sh Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oracle/oraInventory 'AttachHome' was successful.
[oracle@rac2 bin]$

脚本创建,默认是在集群中所有的节点创建inventory目录。

Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes [ID 556834.1] Execute runInstaller with -attachHome option for Oracle Home. % ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=“”ORACLE_HOME_NAME=“” > setup.eOracle oracleplus.netxe -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=“” ORACLE_HOME_NAME=“” For Example:ORACLE_HOME=/u01/app/oracle/product/10.2.0.3 ORACLE_HOME_NAME=OraDb10g_home1 % ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=“/u01/app/oracle/product/10.2.0.3”ORACLE_HOME_NAME=“OraDb10g_home1” If you have more than one oracle home you have to repeat STEP 4 for all remaining Oracle Homes making sure to provide unique ORACLE_HOME_NAME’s foreach ORACLE_HOME.

本文固定链接: http://www.htz.pw/2013/04/30/inventory%e7%9b%ae%e5%bd%95%e6%89%8b%e5%8a%a8%e5%88%9b%e5%bb%ba.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【案例】Oracle数据库inventory手动创建详细过程

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/981.html

Oracle研究中心

关键词:

Oracle inventory问题

手动创建oracle inventory详细过程

Oracle升级遇到inventory故障的解决办法