文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

oracle 打补丁常见问题

2024-04-02 19:55

关注

psu下载文档 ID   Master Note for Database Proactive Patch Program (文档 ID 756671.1)
url:https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=19mcxkl5d5_4&id=756671.1&_afrLoop=347413785398928

oracle打补丁相对来说很简单,特别是12C的 opatchauto 打补丁更是简单的许多,简直是一键操作,但也有一些注意事项:

1.使用新版的Opatch替换原有的Opatch在$ORACLE_HOME里

2.注意Opatch的权限

3.关闭数据库、监听、adrci就是确保$ORACLE_HOME下面的所有文件都没有被使用

具体过程就不操作了,都是操作的活,很简单,下面只是列出一些常见的错误供参考:


更新opatch,此步骤注意权限问题,主要设置chmod -R 775 OPatch && chown -R oracle:oinstall OPatch

$unzip p6880880_112000_Linux-x86-64.zip

$cd $ORACLE_HOME


$mv OPatch OPatch-bak

$pwd
/u01/app/oracle/product/11.2.0/dbhome_1

$mv ~/patch/OPatch OPatch


$chmod -R 775 OPatch


$./opatch version
OPatch Version: 11.2.0.3.19

OPatch succeeded.


解压补丁,此步骤也简单,但是也得注意权限问题,设置 chmod -R 775 28317183 && chown -R oracle:oinstall 28317183

$unzip p28317183_112040_Linux-x86-64.zip


inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/net/resolver/AddrResolution.class 
   creating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/OracleDatabaseMetaData.class 
   creating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/driver/
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/driver/T4CConnection.class 
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/driver/T4CConnection$1.class 
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/driver/OracleSql$1.class 
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/driver/OracleSql$ParseMode.class 
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/driver/OracleSql.class 
   creating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/oracore/
  inflating: 28317183/27923163/files/jdbc/lib/ojdbc5_g.jar/oracle/jdbc/oracore/OracleTypeCOLLECTION.class 
  inflating: PatchSearch.xml        


opatch apply  此步骤出问题最多,如果前面的权限设置了,那么的权限的问题基本不成问题,问题最多的就是上面所讲的:关闭数据库、监听、adrci就是确保$ORACLE_HOME下面的所有文件都没有被使用

看下面例子:

$/s01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.19
Copyright (c) 2018, Oracle Corporation.  All rights reserved.


Oracle Home       : /s01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /s01/app/oraInventory
    from           : /s01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.19
OUI version       : 11.2.0.4.0
Log file location : /s01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch3018-09-20_14-17-04PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following executables are active :
/s01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
/s01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following executables are active :
/s01/app/oracle/product/11.2.0/dbhome_1/lib/libsqlplus.so  ###此处说明sqlplus 没有退出,因此失败,因为opatch apply有可能会改变文件
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /s01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch3018-09-20_14-17-04PM_1.log

OPatch failed with error code 73

解决方法:

退出sqlplus


下面这个错误比较特备,在redhat 6上面基本上不会出现,此是在redhat 7.5上面出现的,7精简安装默认不安装psmisc包,说白了就是少安装了包,缺少fuser命令,这也很好的解释为什么需要确保$ORACLE_HOME下面的所有文件都没有被使用,其实oracle在opatch apply补丁的时候需要检查的有误文件在使用,就像上面的报错:

$/s01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.19
Copyright (c) 2018, Oracle Corporation.  All rights reserved.


Oracle Home       : /s01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /s01/app/oraInventory
    from           : /s01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.19
OUI version       : 11.2.0.4.0
Log file location : /s01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch3018-09-20_14-12-19PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser     ########提示缺少fuser命令
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
UtilSession failed:
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Log file location: /s01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch3018-09-20_14-12-19PM_1.log

OPatch failed with error code 73

解决方法:

#yum install psmisc

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     807人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     351人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     314人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     433人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     221人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯