关于ORACLE Bug 14143632和online patch

本文涉及的产品
云解析 DNS,旗舰版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
全局流量管理 GTM,标准版 1个月
简介: online patch 关于Bug 14143632和online patch 今天线上遇到Bug 14143632 错误代码ORA-30927: Unable to complete execution due to failure in temporary...
online patch


关于Bug 14143632和online patch


今天线上遇到Bug 14143632
错误代码
ORA-30927 : Unable to complete execution due to failure in temporary table transformation
刚开始觉得不知所云,然后查看METALINK

描述:
On ADG, queries that use a cursor-duration temporary table may fail with ORA-30927 errors.
Such queries use Star with Temp Transformation and subquery factoring (WITH clause).
他是存在于ACTIVE 端的使用WITH CLAUSE可能出现错误。
影响主要是11.2.0.3
我们线上PSU已经达到了11.2.0.3.15,但是PSU没有包含这个BUG的补丁他的补丁是
14143632
修复后应用正常。


下载补丁后查看是一个online补丁,也省事了,下面是ONLINE PATCH 安装方式:


某些ORACLE补丁可以在线安装具体查看readme 描述
online补丁支持的系统


01  HP-UX Itanium .............................. ( requries OS Patch HPUX 11iv3 (11.31) + [March 2008 Quality Pack + PHKL_38038] )
02  IBM AIX on POWER Systems (64-bit) .. ( requires AIX 6.1 + TL-02 + SP-01 onwards )
03  IBM: Linux on POWER Systems
04  IBM: Linux on System z
05  Linux x86
06  Linux x86-64
07  Microsoft Windows x86 (32-bit) .......... ( requires Opatch tool version 11.2.0.1.1 )
08  Microsoft Windows x86-64 (64-bit)
09  Oracle Solaris on SPARC (64-bit) ........ ( requires SunOS kernel patch 137111-04 )
10  Oracle Solaris on x86-64 (64-bit) ........ ( requires kernel patch 137112-04 )


11  HP-PARISC           Not supported
12  Windows/Itanium   Not supported


步骤
1、检查是否可以在线安装
[oradba@yjfquery1 14143632]../OPatch/opatch  query -all online
  Oracle Interim Patch Installer version 11.2.0.3.12
  Copyright (c) 2016, Oracle Corporation.  All rights reserved.
 
 
 
 
  Oracle Home       : /home/oradba/oracle/product/11.2.3
  Central Inventory : /oracle/oraInventory
     from           : /home/oradba/oracle/product/11.2.3/oraInst.loc
  OPatch version    : 11.2.0.3.12
  OUI version       : 11.2.0.3.0
  Log file location : /home/oradba/oracle/product/11.2.3/cfgtoollogs/opatch/opatch2016-08-10_10-39-12AM_1.log
 
 
  --------------------------------------------------------------------------------
   Patch created on 5 Jun 2015, 23:20:09 hrs PST8PDT
   Need to shutdown Oracle instances: false
   Patch is roll-backable: true
   Patch is a "Patchset Update": false
   Patch is a rolling patch: true
   Patch is a FMW rolling patch: false
   Patch is a FMW feature bearing patch: false
   Patch is a sql patch: false
   Patch has sql related actions: false
   Patch is an online patch: true   ---ture
   Patch is a portal patch: false
   Patch is an "auto-enabled" patch: false
   Patch is translatable: false
  2、在线安装
   单库:
   opatch apply online -connectString ::
   rac:
   opatch apply online -connectString :::,:::,...
   ../OPatch/opatch apply online -connectString tdb:sys:test
  3、检查安装完成
  ../OPatch/opatch  lsinventory
  4、检查日志alertsid.log
 
 
  Wed Aug 10 10:51:51 2016
  Patch file bug14143632.pch is out of sync with oracle binary; performing fixup
  Patch file bug14143632.pch has been synced with oracle binary
  Patch bug14143632.pch Installed - Update #1
  Patch bug14143632.pch Enabled - Update #2
  Wed Aug 10 10:51:53 2016
  Online patch bug14143632.pch has been installed
  Online patch bug14143632.pch has been enabled
 
 
  SQL> oradebug patch list
 
 
  Patch File Name                                   State
  ================                                =========
  bug14143632.pch                                  ENABLED
 
 
 
 
  5、rollback
  opatch rollback -id -connectString :::,:::, ...
  opatch rollback -id 10188727 -connectString db11202:sys:oracle -invPtrLoc /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
 
 
 
 
  6、注意:
  Online Patching Best Practices
 
 
  -It is strongly recommended to rollback all online patches and replace them with regular (offline) patches on next instance shutdown
  Online patches should be used when the patch needs to be applied urgently and a downtime cannot be scheduled. 
  -IMPORTANT: It is strongly recommended to rollback all online patches and replace them with regular (offline) patches on next instance 
  shutdown
  -Apply one instance at a time When rolling back online patches, ensure all patched instances are included
  -Avoids the dangerous and confusing situation of having different software across instances using the same
../OPatch/opatch  query -all online
  Oracle Interim Patch Installer version 11.2.0.3.12
  Copyright (c) 2016, Oracle Corporation.  All rights reserved.
 
 
 
 
  Oracle Home       : /home/oradba/oracle/product/11.2.3
  Central Inventory : /oracle/oraInventory
     from           : /home/oradba/oracle/product/11.2.3/oraInst.loc
  OPatch version    : 11.2.0.3.12
  OUI version       : 11.2.0.3.0
  Log file location : /home/oradba/oracle/product/11.2.3/cfgtoollogs/opatch/opatch2016-08-10_10-39-12AM_1.log
 
 
  --------------------------------------------------------------------------------
   Patch created on 5 Jun 2015, 23:20:09 hrs PST8PDT
   Need to shutdown Oracle instances: false
   Patch is roll-backable: true
   Patch is a "Patchset Update": false
   Patch is a rolling patch: true
   Patch is a FMW rolling patch: false
   Patch is a FMW feature bearing patch: false
   Patch is a sql patch: false
   Patch has sql related actions: false
   Patch is an online patch: true   ---ture
   Patch is a portal patch: false
   Patch is an "auto-enabled" patch: false
   Patch is translatable: false
  2、在线安装
   单库:
   opatch apply online -connectString ::
   rac:
   opatch apply online -connectString :::,:::,...
   ../OPatch/opatch apply online -connectString tdb:sys:test
  3、检查安装完成
  ../OPatch/opatch  lsinventory
  4、检查日志alertsid.log
 
 
  Wed Aug 10 10:51:51 2016
  Patch file bug14143632.pch is out of sync with oracle binary; performing fixup
  Patch file bug14143632.pch has been synced with oracle binary
  Patch bug14143632.pch Installed - Update #1
  Patch bug14143632.pch Enabled - Update #2
  Wed Aug 10 10:51:53 2016
  Online patch bug14143632.pch has been installed
  Online patch bug14143632.pch has been enabled
 
 
  SQL> oradebug patch list
 
 
  Patch File Name                                   State
  ================                                =========
  bug14143632.pch                                  ENABLED
 
 
 
 
  5、rollback
  opatch rollback -id -connectString :::,:::, ...
  opatch rollback -id 10188727 -connectString db11202:sys:oracle -invPtrLoc /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
 
 
 
 
  6、注意:
  Online Patching Best Practices
 
 
  -It is strongly recommended to rollback all online patches and replace them with regular (offline) patches on next instance shutdown
  Online patches should be used when the patch needs to be applied urgently and a downtime cannot be scheduled. 
  -IMPORTANT: It is strongly recommended to rollback all online patches and replace them with regular (offline) patches on next instance 
  shutdown
  -Apply one instance at a time When rolling back online patches, ensure all patched instances are included
  -Avoids the dangerous and confusing situation of having different software across instances using the same
ORACLE_HOME
-Assess memory impact on a test system before deploying to production
Example: pmap command
-Never remove ORACLEHOME/hpatchdirectoryoracleonline7Othersnotrecommendedwayare:1.Using"oradebug"todisablethepatchSQL>oradebugpatchdisable.pch2.Shuttingtheinstancedownandremovingtheorapatch.cfgfile.Afterstoppingtheinstancedothefollowing:cdORACLE_HOME/hpatch
rm orapatch$ORACLE_SID.cfg


Removing the orapatch*.cfg removes all of the online patches currently installed for the instance.


8、关于patch中文件


bug14143632.pch 实际上pch是一个预编译的C/C++头文件,我们可以使用GCC生成一个但是GCC生成的是gch
g++ t1.h  
t1.h.gch


kgl.o kqr.o 编译后的但是没有库文件连接的二进制文件可以用GCC -c生成
g++ -c t1fu.cpp 
t1fu.o


以下转自网络:
那么正常的流程是:将c.h和a.cpp合并,编译成a.o;将c.h和b.cpp合并,编译成b.o;
最后将a.o和b.o链接成可执行文件。过程很简单,浪费时间之处也一目了然:
头文件c.h的内容实际上被解析了两遍。也许你要说,当然要两遍了,因为头文件几乎是不生成任何代码的,
只有依附于具体的.cpp文件才有意义。正确,但那只是在代码执行过程中。但在代码编译的时候呢?
编译器读入源代码,首先将其解析成为一种内部的表示方式。这个过程与其所依附的.cpp文件并无关系,
编译器接着可以读入.cpp文件并同样解析成内部表示,然后把两段内部表示拼接起来,再进行接下来的操作。
既然编译两个.cpp文件都要先对c.h进行解析,那干嘛不把c.h解析好了保存成临时文件,用时读入,
不就可以省了一次解析的时间了吗?——预编译头技术节省时间的原理正在于此,尤其是在这样一个事实下:
对源代码的“解析”这个步骤,确实是占了编译时间中很可观的一部分。
对了,说了半天,从来没有正面讲过如何使用已经生成的预编译头。然而看到这里也该明白了,是的,很简单,
只要包含其所对应的.h文件即可!比如你有个头文件叫foo.h,另外有一大堆其它文件都包含了这个foo.h,
原来没有使用预编译头技术,现在忽然想使用了,于是把foo.h编译成了 foo.h.gch。那其它文件要做怎样的修改?
——什么都不用,一切照旧!聪明的GCC编译器在查找一个.h文件之前,会自动查找其目录里有没有对应的.gch文件,
如有,且可用,则用之;没有,才用到真正的.h头文件。——慢着,“如有,且可用”,什么叫“可用”?——就是指这个
.gch格式要正确,版本要兼容,而且如上所述,编译两者要用同样的选项。如果.gch不可用,编译器会给出一条警告,
告诉我们:这个预编译头不能用!我只好用原有的.h 头文件啦!什么?你说看不到这个警告?——当然,要先打开 -Winvalid-pch 
选项才行,其默认是关闭的。-H




具体参考metalink
RDBMS Online Patching Aka Hot Patching (文档 ID 761111.1)
目录
打赏
0
0
0
0
91
分享
相关文章
实时计算 Flink版产品使用问题之在online模式下增量抓取Oracle数据时,在archive_log切换时,出现数据丢失的情况,是什么原因
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
Oracle字符乱码、数据越界访问典型Bug分析
前言: 作为乙方,在甲方客户那里验收阶段发现两个诡异Bug。以下就问题来源、问题根因、解决方案、如何避免做详细描述。
200 0
Oracle字符乱码、数据越界访问典型Bug分析
作为乙方,在甲方客户那里验收阶段发现两个诡异Bug。以下就问题来源、问题根因、解决方案、如何避免做详细描述。
482 0
截止20180315 Oracle Database PSU&Bundle Patch备忘
截止20180315  Oracle Database PSU Latest Available Microsoft Windows Patches(20180315) 数据库版本  Last Patches Bundle Patch 12.
2773 0

推荐镜像

更多