一.1 安装程序错误 UtilSession failed: Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
suse11sp2:/oracle/product/11gR2/db/OPatch> ./opatch apply /oracle/product/11gR2/db/16619892/
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/product/11gR2/db
Central Inventory : /oracle/oraInventory
from : /oracle/product/11gR2/db/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.3.0
Log file location : /oracle/product/11gR2/db/cfgtoollogs/
opatch/opatch2013-07-22_18-22-06PM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
The details are:
Patch ( 13343438 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209 211 Patch ( 13696216 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209 Patch ( 13923374 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209 Patch ( 14275605 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209 Patch ( 14727310 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209 Patch ( 16056266 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209 Patch ( 16619892 ) is not applicable on current platform.
Platform ID needed is : 226
Platform IDs supported by patch are: 209
UtilSession failed: Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
Log file location: /oracle/product/11gR2/db/cfgtoollogs/opatch/opatch2013-07-22_18-22-06PM_1.log
OPatch failed with error code 73
suse11sp2:/oracle/product/11gR2/db/OPatch>
仔细查看,发现下载的软件压缩包是 ibm system z 系列的,应该是 oracle 网站打开得太慢,默认是这个版本,需要下拉菜单再次选择 linux -x86-64 对应的软件,结果我动作太快,出错了。
检查看看 PSU 应用的结果 , 未成功 :
suse11sp2:/oracle/product/11gR2/db/OPatch> ./opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
suse11sp2:/oracle/product/11gR2/db/OPatch> ./opatch lspatches
There are no Interim patches installed in this Oracle Home.
一.2 OPatch failed with error code 73
suse11sp2:/oracle/soft> /oracle/product/11gR2/db/OPatch/opatch apply /oracle/soft/16619892/
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/product/11gR2/db
Central Inventory : /oracle/oraInventory
from : /oracle/product/11gR2/db/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.3.0
Log file location : /oracle/product/11gR2/db/cfgtoollogs/opatch/opatch2013-07-22_18-40-42PM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active :
/oracle/product/11gR2/db/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /oracle/product/11gR2/db/cfgtoollogs/opatch/opatch2013-07-22_18-40-42PM_1.log
OPatch failed with error code 73
不使用自动模式,手工运行,一样报错:
suse11sp2:/oracle/soft> /oracle/product/11gR2/db/OPatch/opatch napply -oh $ORACLE_HOME -local /oracle/soft/16619892/
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/product/11gR2/db
Central Inventory : /oracle/oraInventory
from : /oracle/product/11gR2/db/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.3.0
Log file location : /oracle/product/11gR2/db/cfgtoollogs/opatch/opatch2013-07-22_18-42-08PM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active :
/oracle/product/11gR2/db/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /oracle/product/11gR2/db/cfgtoollogs/opatch/opatch2013-07-22_18-42-08PM_1.log
OPatch failed with error code 73
上网 goole ,关键词为 “ OPatch failed with error code 73” , 很快就查到解决办法,明确了其实就是因为有用户进程占用了文件 libclntsh.so.11
suse11sp2:/oracle/soft>
suse11sp2:/oracle/soft>
suse11sp2:/oracle/soft> /sbin/fuser /oracle/product/11gR2/db/lib/libclntsh.so.11.1
/oracle/product/11gR2/db/lib/libclntsh.so.11.1: 5473m
suse11sp2:/oracle/soft> ps -ef | grep 5473
oracle 5473 5399 0 14:45 pts/2 00:00:00 sqlplus as sysdba
oracle 7780 6617 0 18:47 pts/3 00:00:00 grep 5473
suse11sp2:/oracle/soft> kill -9 5473
suse11sp2:/oracle/soft> /sbin/fuser /oracle/product/11gR2/db/lib/libclntsh.so.11.1
suse11sp2:/oracle/soft>
一.3 PATCH 锁住无法继续安装补丁
报错现象 :
------------------------------------------------------------------------------------------------------------------------------
Oracle Home : /oracle/app/11.2.0/grid
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /oracle/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-09-05_19-24-55PM_1.log
OPatchSession cannot load inventory for the given Oracle Home /oracle/app/11.2.0/grid. 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: Lock file left by a different patch, OPatch will not try re-using the lock file.
Log file location: /oracle/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-09-05_19-24-55PM_1.log
------------------------------------------------------------------------------------------------------------------------------
处理方法 :
cd /oracle/app/11.2.0/grid/.patch_storage ;rm patch_locked
一.4 打 G I 的 PSU5 补丁遇到拷贝文件失败案例 1
报错现象 :
-------------------------------------------------------------------------------------------------------------------------------
The following actions have failed:
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libclsra11.so' to '/oracle/app/11.2.0/grid/lib/libclsra11.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libdbcfg11.so' to '/oracle/app/11.2.0/grid/lib/libdbcfg11.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libeons.so' to '/oracle/app/11.2.0/grid/lib/libeons.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libeonsserver.so' to '/oracle/app/11.2.0/grid/lib/libeonsserver.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libgns11.so' to '/oracle/app/11.2.0/grid/lib/libgns11.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libhasgen11.so' to '/oracle/app/11.2.0/grid/lib/libhasgen11.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libocr11.so' to '/oracle/app/11.2.0/grid/lib/libocr11.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libocrb11.so' to '/oracle/app/11.2.0/grid/lib/libocrb11.so'...
Copy failed from '/oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libocrutl11.so' to '/oracle/app/11.2.0/grid/lib/libocrutl11.so'...
…… (y/n)
------------------------------------------------------------------------------------------------------------------------------------------------------
处理方法 :
su - grid
mv /oracle/app/11.2.0/grid/lib/libclsra11.so /oracle/app/11.2.0/grid/lib/libclsra11.so.1
mv /oracle/app/11.2.0/grid/lib/libdbcfg11.so /oracle/app/11.2.0/grid/lib/libdbcfg11.so.1
mv /oracle/app/11.2.0/grid/lib/libeons.so /oracle/app/11.2.0/grid/lib/libeons.so.1
mv /oracle/app/11.2.0/grid/lib/libeonsserver.so /oracle/app/11.2.0/grid/lib/libeonsserver.so.1
mv /oracle/app/11.2.0/grid/lib/libgns11.so /oracle/app/11.2.0/grid/lib/libgns11.so.1
mv /oracle/app/11.2.0/grid/lib/libhasgen11.so /oracle/app/11.2.0/grid/lib/libhasgen11.so.1
mv /oracle/app/11.2.0/grid/lib/libocr11.so /oracle/app/11.2.0/grid/lib/libocr11.so.1
mv /oracle/app/11.2.0/grid/lib/libocrb11.so /oracle/app/11.2.0/grid/lib/libocrb11.so.1
mv /oracle/app/11.2.0/grid/lib/libocrutl11.so /oracle/app/11.2.0/grid/lib/libocrutl11.so.1
-------
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libclsra11.so /oracle/app/11.2.0/grid/lib/libclsra11.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libdbcfg11.so /oracle/app/11.2.0/grid/lib/libdbcfg11.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libeons.so /oracle/app/11.2.0/grid/lib/libeons.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libeonsserver.so /oracle/app/11.2.0/grid/lib/libeonsserver.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libgns11.so /oracle/app/11.2.0/grid/lib/libgns11.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libhasgen11.so /oracle/app/11.2.0/grid/lib/libhasgen11.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libocr11.so /oracle/app/11.2.0/grid/lib/libocr11.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libocrb11.so /oracle/app/11.2.0/grid/lib/libocrb11.so
cp /oracle/app/11.2.0/grid/.patch_storage/13919095_Jul_4_2012_11_10_31/files/lib/libocrutl11.so /oracle/app/11.2.0/grid/lib/libocrutl11.so
然后再输入 y 回车
一.5 打 GI 的 PSU5 补丁遇到拷贝文件失败案例 2
报错现象 :
--------------------------------------------------------------------------------------------------------------------------------
Patching component oracle.crs, 11.2.0.3.0...
Copy failed from '/softtmp/15876003/files/lib/libclsra11.so' to '/oracle/app/11.2.0/grid/lib/libclsra11.so'...
Please verify all applications associated with the Oracle Home '/oracle/app/11.2.0/grid' are shut down. If this is AIX, please perform solution documented in Note 739963.1 on https://myoraclesupport.oracle.com.
Do you want to retry copying the file? [y|n]
… …
-----------------------------------------------------------------------------------------------------------------
处理方法 :
su – gird
mv /oracle/app/11.2.0/grid/lib/libclsra11.so /oracle/app/11.2.0/grid/lib/libclsra11.so .bak
cp /softtmp/15876003/files/lib/libclsra11.so /oracle/app/11.2.0/grid/lib/libclsra11.so
然后再输入 y 回车
(1) root 用户跑 $ORACLE_HOME/crs/install/rootcrs.pl –patch 失败无法正常启动 CRS
处理方法 :
重启 LPAR, #shutdown –Fr, 等待 CRS 正常启动
一.6 CRS-1153: There was an error setting Oracle Clusterware to rolling patch mode.
错误信息:
HQsPSL-SSMS-R01:/oracle/app/12.1.0/grid/crs/install # rootcrs.pl -prepatch
Using configuration parameter file: /oracle/app/12.1.0/grid/crs/install/crsconfig_params
Oracle Clusterware active version on the cluster is [12.1.0.2.0]. The cluster upgrade state is [ROLLING PATCH]. The cluster active patch level is [0].
PROC-28: Oracle Cluster Registry already in current version
CRS-1153: There was an error setting Oracle Clusterware to rolling patch mode.
CRS-4000: Command Start failed, or completed with errors.
2016/11/23 18:45:40 CLSRSC-430: Failed to start rolling patch mode
Died at crspatch.pm line 783.
HQsPSL-SSMS-R01:/oracle/app/12.1.0/grid/crs/install #
根据 MOS:
CAUSE
The issue happens if the cluster is already in rolling patch mode, it's due to unpublished bug:
BUG 19499021 - 12.1.0.2.1GIPSU: OPATCHAUTO HIT CLSRSC-430: FAILED TO START ROLLING PATCH MODE
SOLUTION
The fix is included in 12.1.0.2 GI PSU1, the workaround is to stop rolling patch and re-run opatchauto:
# crsctl stop rollingpatch
解决:
HQsPSL-SSMS-R01:~ # /oracle/app/12.1.0/grid/bin/crsctl stop rollingpatch
CRS-1169: The cluster is consistent and the cluster active patch level is [0].
CRS-4000: Command Stop failed, or completed with errors.
HQsPSL-SSMS-R01:~ #
HQsPSL-SSMS-R01:~ # oerr crs 1169
1169, 0, "The cluster is consistent and the cluster active patch level is [%u]."
// *Cause: The cluster has already completed the rolling patch procedure.
// *Action: None.
HQsPSL-SSMS-R01:~ #
重新执行 /oracle/app/12.1.0/grid/crs/install/rootcrs.pl -prepatch 命令打 PUS 补丁即可。
一.7 ERROR: Unable to run lspatches
2018-10-30 14:49:43: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
ERROR: Unable to run lspatches on /u01/app/oracle/product/11.2.0/dbhome_1
解决: db 软件的 opatch 不是最新版本,请升级到最新版本。
一.8 OPatch failed with error code 106
报错:
OPatch cannot locate your -invPtrLoc '/u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc'
OPatch failed with error code 106
解决:
cp /etc/oraInst.loc /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
一.9 ERROR: This patch is not applicable to GI home.
1、 对 grid 和 oracle 的 $ORACLE_HOME/.patch_storage 目录进行赋权,否则可能会报错:
ERROR: This patch is not applicable to GI home.
解决:
分别对 oracle 和 grid 用户的目录进行赋权:
chmod -R 777 $ORACLE_HOME/.patch_storage
ll -d $ORACLE_HOME/.patch_storage
[root@raclhr-11gR2-N2 OPatch]# ll -d $ORACLE_HOME/.patch_storage
drwxrwxrwx 2 grid oinstall 4096 Oct 30 15:54 /u01/app/11.2.0/grid/.patch_storage
[oracle@raclhr-11gR2-N2 ~]$ ll -d $ORACLE_HOME/.patch_storage
drwxrwxrwx 9 oracle oinstall 4096 Oct 30 16:06 /u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage
一.10 Error : The opatch Applicable check failed. The patch /soft/psu5/15876003 is not applicable to /u01/app/11.2.0/grid
2018-10-30 17:10:09: Running as user grid: /u01/app/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /soft/psu5/15876003 -oh /u01/app/11.2.0/grid
2018-10-30 17:10:09: s_run_as_user2: Running /bin/su grid -c ' /u01/app/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /soft/psu5/15876003 -oh /u01/app/11.2.0/grid '
2018-10-30 17:10:11: Removing file /tmp/fileDJwCRK
2018-10-30 17:10:11: Successfully removed file: /tmp/fileDJwCRK
2018-10-30 17:10:11: /bin/su successfully executed
2018-10-30 17:10:11: Error : The opatch Applicable check failed. The patch /soft/psu5/15876003 is not applicable to /u01/app/11.2.0/grid
2018-10-30 17:10:11: Status of Applicable check for /u01/app/11.2.0/grid is 1
2018-10-30 17:10:11: Error:Patch Applicable check failed for /u01/app/11.2.0/grid
解决:单独执行报错:
[root@raclhr-11gR2-N2 bin]# su - grid
[grid@raclhr-11gR2-N2 ~]$ /u01/app/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /soft/psu5/15876003 -oh /u01/app/11.2.0/grid
Oracle Interim Patch Installer version 11.2.0.3.19
Copyright (c) 2018, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.19
OUI version : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2018-10-30_17-16-03PM_1.log
Invoking prereq "checkapplicable"
ZOP-46: The patch(es) are not applicable on the Oracle Home because some patch actions are not applicable. All required components, however, are installed.
Prereq "checkApplicable" for patch 15876003 failed.
The details are:
Patch 15876003:
Copy Action: Destination File "/u01/app/11.2.0/grid/bin/appvipcfg" is not writeable.
'oracle.crs, 11.2.0.3.0': Cannot copy file from 'appvipcfg' to '/u01/app/11.2.0/grid/bin/appvipcfg'
Copy Action: Destination File "/u01/app/11.2.0/grid/bin/clscfg.bin" is not writeable.
'oracle.crs, 11.2.0.3.0': Cannot copy file from 'clscfg.bin' to '/u01/app/11.2.0/grid/bin/clscfg.bin'
.............
Copy Action: Destination File "/u01/app/11.2.0/grid/lib/acfssinglefsmount.pl" is not writeable.
'oracle.usm, 11.2.0.3.0': Cannot copy file from 'acfssinglefsmount.pl' to '/u01/app/11.2.0/grid/lib/acfssinglefsmount.pl'
Copy Action: Destination File "/u01/app/11.2.0/grid/lib/acfstoolsdriver.sh" is not writeable.
'oracle.usm, 11.2.0.3.0': Cannot copy file from 'acfstoolsdriver.sh' to '/u01/app/11.2.0/grid/lib/acfstoolsdriver.sh'
OPatch succeeded.
GRID_HOME 的权限有问题:
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/11.2.0
待 PSU 安装 完成之后再恢复权限 , 或以下恢复权限的命令不用执行,因为 opatch 打 PSU 的过程中会自动的恢复 $GRID_HOME 的权限 :
<GRID_HOME>/crs/install/rootcrs.pl -unlock
<GRID_HOME>/crs/install/rootcrs.pl -patch
$GRID_HOME/crs/install/rootcrs.pl -init
About Me
........................................................................................................................ ● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除 ● 本文在itpub( http://blog.itpub.net/26736162 )、博客园( http://www.cnblogs.com/lhrbest )和个人weixin公众号( xiaomaimiaolhr )上有同步更新 ● 本文itpub地址: http://blog.itpub.net/26736162 ● 本文博客园地址: http://www.cnblogs.com/lhrbest ● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/ ● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826 ........................................................................................................................ ● QQ群号: 230161599 (满) 、618766405 ● weixin群:可加我weixin,我拉大家进群,非诚勿扰 ● 联系我请加QQ好友 ( 646634621 ) ,注明添加缘由 ● 于 2018-10-01 06:00 ~ 2018-10-31 24:00 在魔都完成 ● 最新修改时间:2018-10-01 06:00 ~ 2018-10-31 24:00 ● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解 ● 版权所有,欢迎分享本文,转载请保留出处 ........................................................................................................................ ● 小麦苗的微店 : https://weidian.com/s/793741433?wfr=c&ifr=shopdetail ● 小麦苗出版的数据库类丛书 : http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麦苗OCP、OCM、高可用网络班 : http://blog.itpub.net/26736162/viewspace-2148098/ ● 小麦苗腾讯课堂主页 : https://lhr.ke.qq.com/ ........................................................................................................................ 使用 weixin客户端 扫描下面的二维码来关注小麦苗的weixin公众号( xiaomaimiaolhr )及QQ群(DBA宝典)、添加小麦苗weixin, 学习最实用的数据库技术。
........................................................................................................................ |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2218185/,如需转载,请注明出处,否则将追究法律责任。