OPatch failed with error code 2
2018-03-02 15:44
302 查看
在检查补丁冲突时报错code 2
[oracle@DBMONITOR01 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /data/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /data/app/oraInventory
from : /data/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-12-21PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" is not executed.
The details are:
Unable to create Patch Object.
Exception occured : PatchObject constructor: Input file "/home/oracle/.cache/etc/config/actions" or "/home/oracle/.cache/etc/config/inventory" does not exist.
OPatch failed with error code 2
--冲突检查报错code 2
[oracle@DBMONITOR01 bin]$ opatch version
OPatch Version: 11.2.0.3.12
OPatch succeeded.
--OPatch版本是足够的,(readme自述文件:You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch)
--使用绝对路径检测冲突
[oracle@DBMONITOR01 bin]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/26925576/
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /data/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /data/app/oraInventory
from : /data/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-22-04PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
--通过检测,然后我使用了相对路径再检测了一次
[oracle@DBMONITOR01 bin]$ cd
[oracle@DBMONITOR01 ~]$ cd 26925576/
[oracle@DBMONITOR01 26925576]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /data/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /data/app/oraInventory
from : /data/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-23-12PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
--所以OPatch failed with error code 2的错误原因很简单,因为没有进入到补丁目录中
--下面是我安装补丁的过程,打的是单节点db psu
[oracle@DBMONITOR01 26925576]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
...
Composite patch 26925576 successfully applied.
OPatch Session completed with warnings.
Log file location: /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-24-20PM_1.log
OPatch completed with warnings.
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> @catbundle.sql psu apply
...
Updating registry...
SQL> INSERT INTO registry$history
2 (action_time, action,
3 namespace, version, id,
4 bundle_series, comments)
5 VALUES
6 (SYSTIMESTAMP, 'APPLY',
7 SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
8 '11.2.0.4',
9 180116,
10 'PSU',
11 'PSU 11.2.0.4.180116');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/data/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_BTNPRO_APPLY_2018Mar02_15_22_21.log
SQL>
SQL> @utlrp.sql
...
PL/SQL procedure successfully completed.
Function dropped.
FAILED CHECK FOR PACKAGE BODY WWV_FLOW_HELP
PL/SQL procedure successfully completed.
SQL> SQL>
--检查注册表中的psu版本,还可以使用opatch lsinv查看
SQL> col comments for a50
SQL> select namespace,version,comments from dba_registry_history;
NAMESPACE VERSION COMMENTS
------------------------------ ------------------------------ --------------------------------------------------
SERVER 11.2.0.4 PSU 11.2.0.4.180116
SERVER 11.2.0.4 PSU 11.2.0.4.180116
[oracle@DBMONITOR01 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /data/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /data/app/oraInventory
from : /data/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-12-21PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" is not executed.
The details are:
Unable to create Patch Object.
Exception occured : PatchObject constructor: Input file "/home/oracle/.cache/etc/config/actions" or "/home/oracle/.cache/etc/config/inventory" does not exist.
OPatch failed with error code 2
--冲突检查报错code 2
[oracle@DBMONITOR01 bin]$ opatch version
OPatch Version: 11.2.0.3.12
OPatch succeeded.
--OPatch版本是足够的,(readme自述文件:You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch)
--使用绝对路径检测冲突
[oracle@DBMONITOR01 bin]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/26925576/
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /data/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /data/app/oraInventory
from : /data/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-22-04PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
--通过检测,然后我使用了相对路径再检测了一次
[oracle@DBMONITOR01 bin]$ cd
[oracle@DBMONITOR01 ~]$ cd 26925576/
[oracle@DBMONITOR01 26925576]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /data/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /data/app/oraInventory
from : /data/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-23-12PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
--所以OPatch failed with error code 2的错误原因很简单,因为没有进入到补丁目录中
--下面是我安装补丁的过程,打的是单节点db psu
[oracle@DBMONITOR01 26925576]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2018, Oracle Corporation. All rights reserved.
...
Composite patch 26925576 successfully applied.
OPatch Session completed with warnings.
Log file location: /data/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-03-02_14-24-20PM_1.log
OPatch completed with warnings.
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> @catbundle.sql psu apply
...
Updating registry...
SQL> INSERT INTO registry$history
2 (action_time, action,
3 namespace, version, id,
4 bundle_series, comments)
5 VALUES
6 (SYSTIMESTAMP, 'APPLY',
7 SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
8 '11.2.0.4',
9 180116,
10 'PSU',
11 'PSU 11.2.0.4.180116');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/data/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_BTNPRO_APPLY_2018Mar02_15_22_21.log
SQL>
SQL> @utlrp.sql
...
PL/SQL procedure successfully completed.
Function dropped.
FAILED CHECK FOR PACKAGE BODY WWV_FLOW_HELP
PL/SQL procedure successfully completed.
SQL> SQL>
--检查注册表中的psu版本,还可以使用opatch lsinv查看
SQL> col comments for a50
SQL> select namespace,version,comments from dba_registry_history;
NAMESPACE VERSION COMMENTS
------------------------------ ------------------------------ --------------------------------------------------
SERVER 11.2.0.4 PSU 11.2.0.4.180116
SERVER 11.2.0.4 PSU 11.2.0.4.180116
相关文章推荐
- opatch apply 报错 OPatch failed with error code 73
- "opatch apply" failed with Error Code 135/ZOP-51 (文档 ID 2102532.1)
- opatch apply 报错 OPatch failed with error code 73
- OPatch failed with error code 73(OracleHomeInventory gets null oracleHomeInfo)
- OPatch failed with error code 41 Following executables are active : /lib/libclntsh.so.11.1
- OPatch failed with error code 73
- OPatch failed with error code 73
- PSU升级时报错:OPatch failed with error code 73
- 安装oracle中间补丁时提示 OPatch 无法找到主产品清单。 OPatch failed with error code 72
- OPatch failed with error code 104报错
- 安装pyspider 时遇到failed with error code pip-build-IAIcv8/pycurl
- 安装composer时Warning: readfile(): SSL operation failed with code 1. OpenSSL Error messages:
- 错误1_clang: error: linker command failed with exit code 1 (use -v to see invocation)
- 【angular】gyp ERR! build error msbuild.exe` failed with exit code: 1
- silverlight tools for visual studio2008sp1无法安装。Installation failed with error code: (0x80070643), 安装
- ld: library not found for -lAFNetworking clang: error: linker command failed with exit code 1 (use -
- 解决安装ipython时Command "python setup.py egg_info" failed with error code 1 in /tmp
- 重启网卡报Job for network.service failed because the control process exited with error code.。。 错误
- ld: framework not found ReactiveCocoa clang: error: linker command failed with exit code 1
- 解决 win10 pycurl安装出错 Command "python setup.py egg_info" failed with error code 10