分享

Oracle Online Patching的限制

 xfxyxh 2022-10-18 发布于湖南

 

特点

  1. Online Patch可以不需要关闭数据库。
  2. 普通的Patch打完后,需要升级数据字典跑脚本,Online Patch则不需要。
  3. Online Patch只能使用opatch apply online --connectString的命令参数去打。
  4. 当然普通的opatch apply,readme有这种方法之一。只不过不会存在$ORACLE_HOME/hpatch的文件夹,即便你enable patch也没有用。

 

限制点

  1. 在已经有打过Online Patch的数据库服务器上,dbca新建库需要注意启用该patch。普通的patch则不需要。
  2. 同理,RAC环境,新添加的实例也是这样。
  3. 如果根据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)

 

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多