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.
估计问题解决了