在搭建oracle 12c rac过程中,已成功安装了grid,在安装database软件时,因为中途出现意外,只能进行重装,将/u01/app/oraInventory目录下文件全部的删除后,database已成功安装在两个节点,但在创建asm磁盘运行asmca时,遇到以下问题:

[[email protected] ~]# su - grid  

[[email protected]:/home/grid]$
[[email protected]:/home/grid]$asmca
DISPLAY not set.
Set DISPLAY environment variable, then re-run.
[[email protected]:/home/grid]$
[[email protected]:/home/grid]$export DISPLAY='192.168.100.1:0.0'
[[email protected]:/home/grid]$
[[email protected]:/home/grid]$asmca

The Oracle Home "/u01/app/12.2.0/grid" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

根据提示,在Oracle Inventory中找不到Oracle Home“/u01/app/12.2.0/grid”作为Oracle Grid Infrastructure Home。

去检查Oracle Inventory,内容如下:

[[email protected]:/u01/app/oraInventory/ContentsXML]$more inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2018, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.2.0.1.4</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0/db_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

而正常的内容如下:

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

问题很明显,之前/u01/app/oraInventory目录下文件全部的删除后,原来grid安装成功后的信息没有了。

那么,是不是把它加回去就可以了呢?试试:

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

再次启动asmca:

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

成功:

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

后来dbca建库的时候,又出现报错:DBT-10002

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

对比发现,需要将oracle database的IDX改为2:

<HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0/db_1" TYPE="O" IDX="2"/>

即:

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

问题解决:

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

The Oracle Home "xxx" is not found in Oracle Inventory as an Oracle Grid Infrastructure Home.

相关文章: