千家信息网

oracle 打补丁常见问题

发表于:2024-11-26 作者:千家信息网编辑
千家信息网最后更新 2024年11月26日,psu下载文档 ID Master Note for Database Proactive Patch Program (文档 ID 756671.1)url:https://support.orac
千家信息网最后更新 2024年11月26日oracle 打补丁常见问题

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

问题 文件 权限 补丁 就是 面的 步骤 命令 数据 数据库 文档 方法 错误 监听 常见 说白了 事项 例子 只是 时候 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 最大速度下载速度和服务器 医学影像数据库知乎 什么是云服务器 什么叫云 查询代码数据库 阿里云服务器ip黑名单设置 网络技术与数据库技术哪个容易 软件开发中uat 熊片数据库org 服务器智能安全网卡 大学生网络安全新闻次 为什么热血江湖服务器一直满员 数据库对象资源管理器新建索引 中专软件开发毕业考大专都考哪些 天天美厨v8需要安装数据库吗 传奇服务器哪个人多 依法开展网络安全检查工作 网络安全工作日常管理制度 青岛网络安全专业学校 你的文件怎么上传到数据库的 嵌入式软件开发工程师什么专业 海南学习软件开发 网络安全攻防软件 北京培训软件开发中心 宝山区管理软件开发质量保障 数据库设计汽车保险报告 网络安全宣传梅江 nba历史得分排名数据库 计算机网络技术有哪些不足 专科计算机网络技术适合女生吗 网络技术发展的四个时代
0