oracle怎么删除目录对象,不要随意删除oracle中的目录或文件

今天给oracle打patch时遇到个问题,oracle版本为10204,报错内容如下:

OPatchSession cannot load inventory for the given Oracle Home /app/oracle/product/10.2.0/db_1. Possible causes are:

No read or write permission to ORACLE_HOME/.patch_storage

Central Inventory is locked by another OUI instance

No read permission to Central Inventory

The lock file exists in ORACLE_HOME/.patch_storage

The Oracle Home does not exist in Central Inventory

UtilSession failed: OracleHomeInventory gets null oracleHomeInfo

OPatch failed with error code 73

查看权限和oracle home的设置均没有问题,所以问题应该出在Central Inventory上,于是输入下面命令:

opatch lsinventory -detail

发生如下报错:

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.Possible causes are:

Oracle Home dir. path does not exist in Central Inventory

Oracle Home is a symbolic link

Oracle Home inventory is corrupted

LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

OPatch failed with error code 73

可以看出提示oracle home在Central Inventory中不存在,Central Inventory记录了Oracle安装的所有组件,进入Central Inventory,发现这些信息均不存在。询问后得知,oracle在装好后这个目录就被删除了,所以就无法更新和打补丁了。[@more@]

修复方法:

./runInstaller -silent -attachHome -invPtrLoc ./oraInst.loc

ORACLE_HOME="" ORACLE_HOME_NAME=""

CLUSTER_NODES="" LOCAL_NODE=""

oracle重建Central Inventory后,补丁可以正常运行了。这个事件告诉我千万不要随意删除oracle下的目录或文件,幸好这次只是在测试库上出现,并且上述的情况还能修复。如果遇到不能修复的又是生产库,那后果。。。。。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值