12C Opatch

解决12c Opatch应用错误的问题
在12c环境中打补丁遇到找不到opatch命令、版本不匹配及组件缺失等问题。通过设置ORACLE_HOME环境变量并尝试多次应用,最终成功应用补丁13242773,但警告需要备份以备回滚。

12c 打补丁 出了一些问题 记录一下 :

[oracle@gc12c 13242773]$ opatch apply
-bash: opatch: command not found

没有设置环境变量

===================================

[oracle@gc12c 13242773]$ /u01/oracle/middleware/oms/OPatch/opatch apply

OPatch Version : 11.1.0.9.5
  OUI  Version : 11.2.0.3.0
The OUI version is not applicable for current OPatch version.

OPatch failed with error code 1
估计12C的 opatch版本与补丁不符。

========================================

[oracle@gc12c 13242773]$ /u01/oracle/middleware/oms/OPatch/opatch apply

OPatch Version : 11.1.0.9.5
  OUI  Version : 11.2.0.3.0
The OUI version is not applicable for current OPatch version.

OPatch failed with error code 1
[oracle@gc12c 13242773]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2012-09-21_15-07-43PM.log

Applying interim patch '13242773' to OH '/u01/app/oracle/product/11.2.0/db_1'
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckApplicable" failed.
The details are:
Patch 13242773: Required component(s) missing : [ oracle.sysman.oms.core, 12.1.0.1.0 ]
[ Error during Prerequisite for apply Phase]. Detail: ApplySession failed during prerequisite checks: Prerequisite check "CheckApplicable" failed.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2012-09-21_15-07-43PM.log

Recommended actions: This patch requires some components to be installed in the home. Either the Oracle Home doesn't have the components or this patch is not suitable for this Oracle Home.

OPatch failed with error code 39
字面上理解是没有设置12c的Oracle_HOME

====================================================

export ORACLE_HOME=/u01/oracle/middleware/oms   ----------------设置ORACLE_HOME指定12c的目录

 

[oracle@gc12c 13242773]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/middleware/oms
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.1.0.9.0
Log file location : /u01/oracle/middleware/oms/cfgtoollogs/opatch/opatch2012-09-                                                              21_15-03-00PM.log


OPatch detects the Middleware Home as "/u01/oracle/middleware"

Applying interim patch '13242773' to OH '/u01/oracle/middleware/oms'
Verifying environment and performing prerequisite checks...
Interim patch 13242773 is a superset of the patch(es) [  13242773 ] in the Oracl                                                              e Home
OPatch will rollback the subset patches and apply the given patch.

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Backing up files...
Rolling back interim patch '13242773' from OH '/u01/oracle/middleware/oms'

Patching component oracle.sysman.oms.core, 12.1.0.1.0...
RollbackSession removing interim patch '13242773' from inventory

--------------------------------------------------------------------------------
**************************************************************************
Please Ensure that you backup the OMS which comprises of your Repository,
Middleware Home, Instance Home, and Software so that you can deinstall
this patch. This patch cannot be rolled back until you restore the
backup taken before patch apply.

If you Havent yet taken the backup, Please run:
   $ opatch rollback -id 13242773
to rollback the patch now, and start with the patch application again
after taking the backup.
**************************************************************************

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

 

OPatch back to application of the patch '13242773' after auto-rollback.


Patching component oracle.sysman.oms.core, 12.1.0.1.0...

--------------------------------------------------------------------------------
**************************************************************************
Please Ensure that you backup the OMS which comprises of your Repository,
Middleware Home, Instance Home, and Software so that you can deinstall
this patch. This patch cannot be rolled back until you restore the
backup taken before patch apply.

If you Havent yet taken the backup, Please run:
   $ opatch rollback -id 13242773
to rollback the patch now, and start with the patch application again
after taking the backup.
**************************************************************************

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

Patch 13242773 successfully applied
OPatch Session completed with warnings.
Log file location: /u01/oracle/middleware/oms/cfgtoollogs/opatch/opatch2012-09-21_15-03-00PM.log

OPatch completed with warnings.
估计问题解决了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值