oracle打补丁时的104、73、74

本文详细介绍了在SUSE系统中,当使用OPatch工具进行Oracle补丁更新时遇到错误代码104的问题。通过检查和修复缺失的oraInst.loc文件,以及重建CentralInventory目录,可以解决此问题。操作步骤包括确认oraInst.loc文件位置、移除现有CentralInventory、改变目录到oui.bin、使用runInstaller或setup.exe重新安装Oracle,确保OracleOwner拥有正确的权限。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

测试部打补丁报OPatch failed with error code 104,错误的详细信息中可以看到端倪:

......

OPatch cannot find a valid oraInst.loc file to locate Central Inventory.

OPatch failed with error code 104


   缺少oraInst.loc文件文件,该文件用来定义oraInventory的位置和oracle所属的用户组。在suse系统中,他的默认地址是在/etc/oraInst.loc

# cat /etc/oraInst.loc

inventory_loc=/home/oracle/zxindbf/oraInventory

inst_group=dba

   该文件在oracle安装之前要手动创建并做好定义。oracle patch工具会工具这个配置文件寻找oracle安装路径,得到安装及其历史patch的信息,如果找不到该配置文件,就报104错误

   手动创建该文件,填写如上信息之后:

LsInventorySession failed: OracleHomeInventory::load() gets null oracleHomeInfo

OPatch failed with error code 73。

   说明oracle根据配置文件找到/home/oracle/zxindbf/oraInventory,但是该文件夹不存在或者并非oracle完全安装信息路径,这个时候需要工具metalink Doc id 556834.1来重建oraInventory(Central Inventory)


Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes

STEP 1: Locating the central inventory


  • The location of the central inventory can be found from the central inventory pointer can be found from the file /etc/oraInst.loc (AIX and Linux) or /var/opt/oracle/oraInst.loc (Platform specific)

  • If an oraInst.loc file does not exist, then create one as below with the following entries:

    inventory_loc=<location_for_oraInventory>
    inst_group=<name_of_group_for_installtion>

    Example:
    inventory_loc=/u01/oracle/oraInventory
    inst_group=oinstall

    Note: Make sure that the Oracle Owner has proper permissions (755) on the location specified for the oraInventory.


STEP 2:

Remove the Central inventory (if it exists)

Use the following command to rename the oraInventory (Unix/Linux)

% mv oraInventory oraInventory_orig

Use the Windows Explorer or the "move" command to rename the Inventory (Windows) located under c:\Program Files\oracle (default location)


STEP 3:

Change the directory to the oui location.

Use the following command to change the directory to the oui location.
(Unix/Linux): % cd $ORACLE_HOME/oui/bin

(Windows): > cd %ORACLE_HOME%\oui\bin


STEP 4:

Attaching the Home for Oracle Database 10.2.0.1 and above.

Execute runInstaller with -attachHome option for Oracle Home.

% ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Name_Of _Oracle_Home>"

> setup.exe -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Name_Of _Oracle_Home>"

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 for each ORACLE_HOME.




   /home/oracle/oracle10g/cfgtoollogs/opatch/opatch_history.txt中记录了历史patch 信息。


   。。。。。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值