Oracle Online Patching的限制
Oracle Online Patching的限制
特点
- Online Patch可以不需要关闭数据库。
- 普通的Patch打完后,需要升级数据字典跑脚本,Online Patch则不需要。
- Online Patch只能使用opatch apply online --connectString的命令参数去打。
- 当然普通的opatch apply,readme有这种方法之一。只不过不会存在$ORACLE_HOME/hpatch的文件夹,即便你enable patch也没有用。
限制点
- 在已经有打过Online Patch的数据库服务器上,dbca新建库需要注意启用该patch。普通的patch则不需要。
- 同理,RAC环境,新添加的实例也是这样。
- 如果根据readme使用offline模式打,目前没找到可以成功enable的方法。
新数据库需要手工enable补丁
我们挑其中一个限制点做说明,比如第1个,新创建的数据库需要再次手工去enable补丁。
从一个通过opatch apply online --connectString的命令打成功的环境,dbca新建一个test数据库。
[oracle@oracle 18034737]$ opatch apply online -connectString zkm:sys:oracle: Oracle Interim Patch Installer version 11.2.0.3.21 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc OPatch version : 11.2.0.3.21 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2020-06-06_19-26-40PM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 18034737 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name. Visit http://www.oracle.com/support/policies.html for details. Email address/User Name: You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y Backing up files... The patch should be applied/rolled back in '-all_nodes' mode only. Converting the RAC mode to '-all_nodes' mode. Applying interim patch '18034737' to OH '/u01/app/oracle/product/11.2.0/db_1' Patching component oracle.rdbms, 11.2.0.4.0... Installing and enabling the online patch 'bug18034737.pch', on database 'zkm'. Patch 18034737 successfully applied. Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2020-06-06_19-26-40PM_1.log OPatch succeeded. [oracle@oracle 18034737]$ cd $ORACLE_HOME/hpatch [oracle@oracle hpatch]$ ll total 528 -rw-r--r--. 1 oracle oinstall 264374 Jun 6 19:26 bug18034737.pch -rw-------. 1 oracle oinstall 1 Jun 6 19:26 bug18034737.pchzkm.fixup -rwx------. 1 oracle oinstall 263350 Jun 6 19:26 bug18034737.so -rw-------. 1 oracle oinstall 712 Jun 6 19:26 orapatchzkm.cfg [oracle@oracle trace]$ opatch lspatches 18034737;
dbca:
新库的patch是未启用的状态:
[oracle@oracle hpatch]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 6 19:46:25 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS@test> oradebug patch list Patch File Name State ================ ========= No patches currently installed
需要通过opatch手工启动,
[oracle@oracle hpatch]$ opatch util EnableOnlinePatch -connectString test:sys:oracle -id 18034737 Oracle Interim Patch Installer version 11.2.0.3.21 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc OPatch version : 11.2.0.3.21 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2020-06-06_19-48-25PM_1.log Invoking utility "enableonlinepatch" Installing and enabling the online patch 'bug18034737.pch', on database 'test'. OPatch succeeded. [oracle@oracle hpatch]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 6 19:48:38 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS@test> oradebug patch list Patch File Name State ================ ========= bug18034737.pch ENABLED
参考文档
Limits Of Online Patching (Doc ID 1463390.1)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?