【PSU】AIX Oracle 11g RAC自动打GI PSU5补丁(11.2.0.3.5)--PSU升级详细过程
相关MOS文档地址:http://blog.itpub.net/26736162/viewspace-2096650/
1.1 BLOG文档结构图
1.2 前言部分
1.2.1 导读和注意事项
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:
① 升级PSU的一般性方法(重点)
② PSU/CPU/PATCHSET等的一些相关概念
③ 如何查看oracle的PSU,如何在MOS上找到想要的patch号
Tips:
① 若文章代码格式有错乱,推荐使用QQ、搜狗或360浏览器,也可以下载pdf格式的文档来查看,pdf文档下载地址:http://yunpan.cn/cdEQedhCs2kFz (提取码:ed9b)
② 本篇BLOG中命令的输出部分需要特别关注的地方我都用灰色背景和粉红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大归档日志号为43是需要特别关注的地方;而命令一般使用黄色背景和红色字体标注;对代码或代码输出部分的注释一般采用蓝色字体表示。
List of Archived Logs in backup set 11
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 32 1621589 2015-05-29 11:09:52 1625242 2015-05-29 11:15:48
1 33 1625242 2015-05-29 11:15:48 1625293 2015-05-29 11:15:58
2 42 1613951 2015-05-29 10:41:18 1625245 2015-05-29 11:15:49
2 43 1625245 2015-05-29 11:15:49 1625253 2015-05-29 11:15:53
[ZHLHRDB1:root]:/>lsvg -o
T_XDESK_APP1_vg
rootvg
[ZHLHRDB1:root]:/>
00:27:22 SQL> alter tablespace idxtbs read write;
====》2097152*512/1024/1024/1024=1G
本文如有错误或不完善的地方请大家多多指正,ITPUB留言或QQ皆可,您的批评指正是我写作的最大动力。
1.2.2 相关参考文章链接
【MOS】PSU等 补丁号码快速参考 (ID 1922396.1 和 756671.1) : http://blog.itpub.net/26736162/viewspace-2096650/
Oracle 11g升级PSU详细步骤:http://blog.itpub.net/26736162/viewspace-2096696/
如何获取oracle的补丁通告信息以及下载补丁 : http://blog.itpub.net/26736162/viewspace-2096695/
1.2.3 本文简介
工作中一直没碰到过打PSU的问题,最近系统要求安装的库必须和生产库一致,必须打PSU,那么就顺便学习了一下PSU的安装,记下来分享给大家。
1.3 相关知识点扫盲(摘自网络+MOS)
每个数据库版本都有自己的PSU,PSU版本号体现在数据库版本的最后一位,MOS站点中Oracle Recommended Patches — Oracle Database [ID 756671.1] 文档中查到各个产品版本最新的PSU。
PSU (Patch Set Updates)
PSU(补丁集更新)是累积型补丁--即某个特定的补丁集,它先前所有的PSU被包含于最近的PSU中,例如:11.2.0.3.11的所有bug修复被包含于11.2.0.3.12中。PSU包含推荐的bug修复,及最近的CPU,PSU每个季度发布一次。
Oracle对于其产品每个季度发行一次的补丁包,包含了bug的修复。Oracle选取被用户下载数量多的,并且被验证过具有较低风险的补丁放入到每个季度的PSU中。在每个PSU中不但包含Bug的修复而且还包含了最新的CPU。
CPU: Critical Patch Update (SPU: Security Patch Update)
Oracle对于其产品每个季度发行一次的安全补丁包,通常是为了修复产品中的安全隐患。
名称 |
说明 |
Release |
¤ 标准产品发布。如Oracle Database 10g Release 2的第一个发行版本为10.2.0.1,可以在OTN、edelivery等站点上公开下载 |
Patch Set Release |
¤ 就是早期大家常说的PSR。这是在主版本号上发布的补丁集,修复了较多的Bug,可能会包含一些增强功能(Enhancement)。比如11.2.0.1是一个主版本,那么11.2.0.2、11.2.0.3就是2个不同的Patch set。这种补丁集经过了严格的集成测试,也是累积型的。所以推荐安装最新的Patch Set。 |
Patch Set Update |
¤ 就是DBA&DMA们常论道的PSU。Oracle 选取在每个季度用户下载数量最多,并且得到验证具有较低风险的补丁放入到每个季度的PSU中,修复比较严重的一些问题,包含每个季度的CPU,是累积型的。虽然在描述PSU的时候会用到数据库版本第5位,比如Database PSU 11.2.0.3.5,但实际上打完PSU后并不会真正改变数据库的版本,从v$version中看到的版本还是4位的(11.2.0.3.0),第5位仍然是0。 ¤ 注意 (1)Windows上没有CPU和PSU,对于Windows和Exadata,Oracle使用Bundle Patch代替PSU,Bundle Patch会包含PSU的内容 (2)从11.2.0.2版本开始,一个新的补丁策略被引入,11.2.0.1之后发布的Patch Set本身就是一个完整的安装包,不再需要基础的Release 版本安装。 |
Critical Patch Update |
¤ 这个指的就是CPU补丁。每季度发布一次,用来修复安全方面的一些补丁,是累积型的。目前(2012年10月)已经更名为Security Patch Update (SPU) ¤ 这类问题本来不属于软件错误,在正常使用中不会出现任何问题。但是别有用心的人可以通过运行非常精巧设计的代码 ,绕过数据库系统的安全管理机制,达到非授权存取的目的。 |
Interim Patch/One-OffPatch |
¤ 是我们常说的小补丁,为了修复某(几)个Bug而发布的补丁。这种补丁推荐在测试库上测试无误后再安装在生产库上。 |
Merged Patch |
¤ 合并的补丁。当几个小补丁之间有冲突,不能同时安装的时候,需要提供这种Merged Patch。补丁冲突主要是由于2个或者多个补丁修改同一个文件,但是修改的内容是不同的。 |
Bundle Patch(BP) |
¤ 补丁集,修复多个Bug。在Windows平台上的Oracle没有小补丁,只有这种Bundle Patch。 这种累积型的补丁集会周期性的发布(至少每季一次),也就是每个Bundle Patch会包含之前所有的Bundle Patch。比如Windows Bundle Patch 16,它会包含之前所有15个Bundle Patch,所以我们总是推荐安装最新的Bundle Patch。Oracle的集群软件和数据库软件的Window Bundle Patch是同一个,比如Windows Bundle Patch 16(补丁号16167942,既可以打在集群上,也可以打在数据库上) 。 ■要了解Windows Bundle Patch的补丁号,可以参考MOS文档: ■这部分有待补充 |
Diagnostic Patch |
诊断补丁。顾名思义,这类补丁不是用来解决问题的,而是用来寻找问题的原因的。这类补丁只在Oracle技术支持部门要求安装时,才需要安装。在得到需要的诊断信息后 ,应立即卸载这一补丁。 |
Composite Patch |
¤ 从2012年4月份的Database PSU 11.2.0.3.2和11.2.0.2.0.7开始,推出一种新的概念叫Composite Patches。 这是一种新型的补丁包,它不同于其他的累积型补丁包。如果是第一次安装Composite Patches,那么该Composite Patches所包括的全部补丁都会被安装,后续安装的Composite Patches,只会安装对比前一次Composite Patches有变化的部分和新增加的补丁。 ¤ Composite Patche的改进包括减少补丁安装时间,减少回滚以前应用的overlay patches的需要。 新的Composite Patches格式,使以前PSU应用的overlay patches和新安装的PSU并存成为可能。更多信息,请参考Document 1376691.1 ‘Composite Patches for Oracle Products’ 和Oracle Database Support NEWS April edition. ■ PSU就是一种Composite Patch ¤第一次安装的composite patch为PSU 11.2.0.3.5: Oracle Database 11g 11.2.0.3.0 Interim patches (1) : Patch 14727310: applied on Fri Dec 09 10:59:28 EST 2011 Sub-patch 13923374; “Database Patch Set Update : 11.2.0.3.3 (13923374)”<==Sub-patch Sub-patch 14275605; “Database Patch Set Update : 11.2.0.3.4 (14275605)”<==Sub-patch Sub-patch 13923374; “Database Patch Set Update : 11.2.0.3.3 (13923374)”<==Sub-patch Bugs fixed: |
Oracle 补丁那些事儿(PS、PSU、CPU、SPU、BP、DBBP…)
当前ORACLE数据库提供两种方式的补丁一种是主动的Proactive Patches和另一种被动的Reactive Patches,其中Reactive Patches是指过去的ONE-OFF Patch,而过去的PSU,SPU/CPU,BP都是Proactive Patches。从12c(12.1.0.2)起数据库又提供了一个名为DBBP的补丁类型,在数据库安装选择补丁时建议是PSU,CPU,DBBP中的一种,在12c以前至少是安装相应版本的PSU,而从12.1.0.2起想要安装更全的补丁集应该选择DBBP,DBBP更是一种趋势,以后可能会替代PSU,就像以前的CPU后改名为SPU,安装SPU建议以PSU的方式一样,DBBP成了更大的超集,下面来整理一份数据库相关的补丁术语及注意事项。
patch number改变
从2015年11月开始数据库相关的PSU,SPU,BP的版本号第5位发生改变,如11204的PSU的11.2.0.4.8下个版本不再是11.2.0.4.9,而是11.2.0.4.160119, 格式是与发布日期相关的YYMMDD,年份的后两位月份和日期。方便查找PATCH的时间段。更多信息关注Doc ID 2061926.1
SPU/CPU改变
从12.1.0.1开始数据库提供安全相关的修复不再单独以SPU的形式发布,而是以PSU或DBBP打包的方式集中修复,这种方式也更为简单,PSU从2009年起就是ORACLE主动修改首选,也许会从2016年后DBBP会成为首选(linux/unit)。更多信息关注1581950.1
BP FOR EXADATA AND DBIM改变
从2016年4月 Database Patch for Engineered Systems and Database In-Memory Bundle Patch (BP) ”改名为 “Database Proactive Bundle Patch”. 也就是DBBP,不再仅限于EXADATA系统,你也许会话如果以字母简写更应该呢DPBP或者是PBP for DB, “Database Proactive Bundle Patch”更是多个PSU的超集,包含了GI PSU、DB PSU及EXPDATA和DBIM的相关修复,从dba_registry_sqlpatch视图中可以看到Database Bundle Patch (DBBP) 区别于原来的PSU,也就是从12.1.0.2以后Database Proactive Bundle Patch可以应用于所有数据库环境。另外DBBP仅用于LINUX和UNIX环境,与WINDOWS 的BP没有关系, Windows平台还继续使用Bundle Patch (Windows 32bit & 6bit). 更多信息关注Note 1937782.1
如何选择最新的补丁?
查看Assistant: Download Reference for Oracle Database PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases (Doc ID 2118136.2)
另外SPU, PSU ,DBBP不兼容,更换补丁方法要检查冲突,回滚之前的冲突,如安装DBBP不能基于上一季度的PSU。
1) SPU contains only the CPU program security fixes
2)PSU contains the CPU program security fixes and additional high-impact/low-risk critical bug fixes
3)Proactive Bundle Patch (PBP) includes all PSU fixes along with fixes targeted at the specific Bundle Patch environment.
4)PSU – Can be applied on Database Servers, Client-Only and Instant Client.
5)GI PSU – Can be applied on GI Home (Oracle Restart or Oracle Clusterware) in conjunction with RAC, RACOne, Single Instance home, Client-Only and Instant Client.
6)Proactive Bundle Patch – Can be applied on GI Home in conjunction with RAC, RACOne, or Single Instance home, Client-Only and Instant Client.
补丁的术语:
名称 | 说明 |
Release Release | 版本的前2个字段指定(小数点分隔的字段)如ORACLE 10gR1 10gR2 , 11gR1 11gR2, 12cR1 12cR2… |
Base/Major Release | 版本的前4个字段, 如11.2.0.1, 可以在OTN、edelivery等站点上公开下载, |
Patch Set Release | 就是早期大家常说的PSR。这是在主版本号上发布的补丁集,版本的第4个字段指定,如11.2.0.4,修复了较多的Bug,可能会包含一些增强功能(Enhancement)。比如11.2.0.1是一个主版本,那么11.2.0.2、11.2.0.3就是2个不同的Patch set。这种补丁集经过了严格的集成测试,也是累积型的。所以推荐安装最新的Patch Set。 |
Database Patch Set Update | 就是DBA&DMA们常论道的PSU.Oracle 选取在每个季度用户下载数量最多,并且得到验证具有较低风险的补丁放入到每个季度的PSU中,修复比较严重的一些问题,包含每个季度的CPU,是累积型的。针对数据库以及数据库客户端的重要修复。包括安全(CPU)内容。没有优化器修复,虽然在描述PSU的时候会用到数据库版本第5位,但实际上打完PSU后并不会真正改变数据库的版本,需要从opatch lsinv确认 ¤ 注意 (1) Windows上没有CPU和PSU,对于Windows和Exadata,Oracle使用Bundle Patch代替PSU,Bundle Patch会包含PSU的内容 (2) 在11G之前有些PSU可以直接安装,而有些PSU则必须要求安装了上一个版本的PSU之后才能继续安装。比如对于10.2.0.4版本的数据库来说,PSU 10.2.0.4.4可以直接安装在最原始的10.2.0.4.0版本中,而最新的PSU 10.2.0.4.8则必须要求先安装10.2.0.4.4。更多信息参考PSU 附带的readme.txt (3)从11.2.0.2版本开始,一个新的补丁策略被引入,11.2.0.1之后发布的Patch Set本身就是一个完整的安装包,不再需要基础的Release 版本安装。 MOS站点中Oracle Recommended Patches — Oracle Database [ID 756671.1] 文档中查到各个产品版本最新的PSU。 查看PSU $opatch lsinventory -bugs_fixed | grep -i ‘DATABASE PSU’ # 11g r2 and above $ opatch lsinventory | grep “Patch Set Update” |
Database Grid Infrastructure Patch Set Update | 也就是GI PSU,适用于11.2.0.1以上的RAC DB 安装在 Unix 平台上 (包括单实例 RAC)。补丁包括 Grid Infrastructure 的重要修复,也包括匹配的 DB PSU,但不包括任何 OJVM PSU,季度发行,在11.2以前叫CRS PSU,从11.2后不再发行。 |
OJVM Patch Set Update | 也就没是OJVM PSU, 适用于数据库版本DB 版本 11.1.0.7,11.2.0.3,11.2.0.4,12.1.0.1 及以上所有平台。须知 Windows 平台有特殊的 OJVM PSU 覆盖补丁安装于 Windows BP 上, 2014年10月提出 OJVM PSU,但是 OJVM 和 JDBC 有单独的补丁。 在12c中的DBBP中包含了OJVM PSU |
Timezone Patches | DB 和 DB client 安装,当对最新时区数据要求很高时,补丁仅包含时区数据,每半年发行一次。 |
Critical Patch Update | Oracle在2005年开始引入的产品安全更新策略,CPU最早的雏形出现在2005年,该项目致力于为客户周期性地提供累积性的补丁以修复安全漏洞。没有一个强制要求安装CPU的理由,Oracle仅仅是强烈推荐实施这些补丁以降低潜在的安全风险并降低受到骇客入侵成功的概率, 由月/年指定 如11.2.0.4 Jan 2015 SPU ¤ 这个指的就是CPU补丁。每季度发布一次,用来修复安全方面的一些补丁,是累积型的。目前(2012年10月)已经更名为Security Patch Update (SPU) ¤ 这类问题本来不属于软件错误,在正常使用中不会出现任何问题。但是别有用心的人可以通过运行非常精巧设计的代码 ,绕过数据库系统的安全管理机制,达到非授权存取的目的。 分为Normal CPU和Molecular CPU(最早是从10.2.0.3 CPUJUL2007)For LINUX/UNIT 平台, CPU Bundle Patch For Windows平台 ¤ 重要补丁公告参见这里. PSU包含了最新的CPU, 从12.1.0.1开始CPU不再单独发布而是包含在PSU中发布。 |
Interim Patch/One-Off Patch | ¤ 是我们常说的小补丁,为了修复某(几)个Bug而发布的补丁。这种补丁推荐在测试库上测试无误后再安装在生产库上。 |
Merged Patch | ¤ 合并的补丁。当几个小补丁之间有冲突,不能同时安装的时候,需要提供这种Merged Patch。补丁冲突主要是由于2个或者多个补丁修改同一个文件,但是修改的内容是不同的。 |
“Quarterly Full Stack Download Patch” / “Combo Patch” | 若干不同的补丁打包在一起发布,适用于DB 版本 11.1.0.7,11.2.0.3,11.2.0.4,12.1.0.1 及以上,2014年10月开始每季度发行一次, 在一个下载中包括不同组件的 Patch Set Updates 例如:”Quarterly Full Stack Download Patch for Exadata” 把 “Quarterly Database Patch for Exadata”与 OJVM PSU 还有其他的 Exadata系统补丁包含在一个下载链接中。 |
Windows Bundle Patch(BP) | ¤ 仅适用于WINDOWS平台的补丁集修复多个Bug。在Windows平台上的Oracle没有小补丁,只有这种Bundle Patch。 这种累积型的补丁集会周期性的发布(至少每季一次),也就是每个Bundle Patch会包含之前所有的Bundle Patch。比如Windows Bundle Patch 16,它会包含之前所有15个Bundle Patch,所以我们总是推荐安装最新的Bundle Patch。Oracle的集群软件和数据库软件的Window Bundle Patch是同一个,比如Windows Bundle Patch 16(补丁号16167942,既可以打在集群上,也可以打在数据库上) , 每季度会包含 DB PSU 和 OJVM PSU 内容。。 ■要了解Windows Bundle Patch的补丁号,可以参考MOS文档: |
Diagnostic Patch | 诊断补丁。顾名思义,这类补丁不是用来解决问题的,而是用来寻找问题的原因的。这类补丁只在Oracle技术支持部门要求安装时,才需要安装。在得到需要的诊断信息后 ,应立即卸载这一补丁。 |
Composite Patch | ¤ 从2012年4月份的Database PSU 11.2.0.3.2和11.2.0.2.0.7开始,推出一种新的概念叫Composite Patches。 这是一种新型的补丁包,它不同于其他的累积型补丁包。如果是第一次安装Composite Patches,那么该Composite Patches所包括的全部补丁都会被安装,后续安装的Composite Patches,只会安装对比前一次Composite Patches有变化的部分和新增加的补丁。 ¤ Composite Patche的改进包括减少补丁安装时间,减少回滚以前应用的overlay patches的需要。 新的Composite Patches格式,使以前PSU应用的overlay patches和新安装的PSU并存成为可能。更多信息,请参考Document 1376691.1 ‘Composite Patches for Oracle Products’ 和Oracle Database Support NEWS April edition. ■ PSU就是一种Composite Patch ¤第一次安装的composite patch为PSU 11.2.0.3.5: Oracle Database 11g 11.2.0.3.0 Interim patches (1) : Patch 14727310: applied on Fri Dec 09 10:59:28 EST 2011 Sub-patch 13923374; “Database Patch Set Update : 11.2.0.3.3 (13923374)”<==Sub-patch Sub-patch 14275605; “Database Patch Set Update : 11.2.0.3.4 (14275605)”<==Sub-patch Sub-patch 13923374; “Database Patch Set Update : 11.2.0.3.3 (13923374)”<==Sub-patch Bugs fixed: |
Database Patch for Exadata | 也叫EXADBBP 或BP,仅用于exadata machine ORACLE 11G,每月发行, 每月重要 的BP都会放在本季度的Quarterly Full Stack Download Patch for Exadata |
Quarterly Full Stack Download Patch for Exadata | QFSDP for Exadata,同样也是仅用于EXADATA MACHINE ORACLE 11G, 每季度发行,包括 Exadata 上的数据库补丁以及其他 Exadata 组件的补丁。 不可用于非EXADATA系统。大多数更新都是专门为 Exadata 上的 Oracle Database (DB_BP) 和 Oracle Clusterware (GI_BP) 创建的 Bundle patches 发行的。Bundle patches 包含的不是 Exadata 特定代码,但是,只能在用于测试目的,或者是为Exadata 系统提供灾难恢复支持的时候,才可以在 non-Exadata 系统上安装这些补丁。只有当 non-Exadata 系统用在 Data Guard 环境中作为 Exadata 系统的备用系统时,Oracle 才为 non-Exadata 系统提供在 Exadata bundle patches 基础上的临时修复。 |
Database Proactive Bundle Patch | 适用于12c 数据库安装在 Exadata 上,同样适用于任何使用 Database In-Memory (DBIM) 特性的 12c 系统,RAC 或 non-RAC。数据库和 Grid 的 home 也适用。仅用于 12.1.0.2 及以上 DB on linux/unix平台,从1937782.1可以看出在2016年4月前的补丁都是叫for Engineered Systems and DB In-Memory, 发布周期为每个月一次,截至2016年4月,Database Patch for Engineered Systems and Database In-Memory 已重新命名为”Database Proactive Bundle Patch”,不再只限于Engineered Systems and DB In-Memory,可以用于EXADATA也可以用于非EXADATA,和RAC及非RAC系统。为每季度发布一次,成为了一种新型的季度补丁,也是累计型,版本的第5个字段指定,”Database Proactive Bundle Patch”比Patch Set Update (PSU) 需要多一些测试,因为它提供了大量的修复. ¤DBBP就PSU的 超集,BP是增量包含的如10,包含1-9,也包含了创建BP时最近的PSU和CPU,所以建议安装最新的BP, 准确应该是说包含了PSU,CPU修复的问题。 ¤最新的BP latest Bundle Patch can be found in the MOS note 21188742.8 or in the Mos note: 12.1.0.2 Bundle Patches for Engineered Systems and DB In-Memory (Doc ID 1937782.1). ¤For In-Memory customers we recommend that you always run with the latest Bundle Patch! ¤重要的一点是12C的DBBP和以前的 “Windows Bundle Patch” (BP)没有直接关系,windows 还是继续使用之前的WINDOWS BP. 新的DBBP在单独的子目录中所含下列组件: * Clusterware component the same as GI PSU * ACFS component the same as GI PSU * 一个数据库bundle 组件包含了所有的PSU修复补丁及并且“以及专门针对Engineered Systems and DB In-Memory的额外修复” ¤虽然DBBP是包含了多个PSU和BUG FIXED,但是DBBP不能是基于上一季度的PSU继续安装,反之亦然,所以如果切换DBBP和PSU的补丁安装技术需要提前rollback有冲突的PSU, 这样做需要更我的时间窗口和停机时间。 如果下载同期的DBBP和PSU 会发现里面的子补丁存在互斥, 在DBBP的readme中会看到DBBP明确是增量的包含了所有的PSU和CPU,虽然子补丁号不同 但是安装后使用opatch lsinventory -bugs_fixed 会发现DBBP会包含了同期PSU修得的所有BUG,还能找到一些fixed的BUG在DBBP中,而没有在PSU中 。除此之外,“Proactive”DBBP包含Non-Engineered Systems或DBIM时影响RDBMS的PSU中未包含修复的错误。 dba_registry_sqlpatch视图的字段BUNDLE_SERIES可以看到安装的PATCH是PSU还是DBBP. 前面所指的都是ORACLE企业版,在有些DBBP的readme中可能会写标准版还是应该安装PSU,注意是“应该”而不是“必须”. o 该 bundle 的修复信息可能包括一些”Exadata”特定的修复,这是因为 bundle 同样适用于 Exadata 系统。 o 详情请参阅 Note 1937782.1 12.1.0.2 Database Proactive Bundle Patches / Bundle Patches for Engineered Systems and DB In-Memory – List of Fixes in each Bundle – 每个 bundle 的修复列表。
|
1.3.1 Upgrade与Update
首先,我们针对所使用的数据库可能会进行如下措施,版本升级或补丁包升级,那何为版本升级、何为补丁包升级呢?
比如我的当前数据库是10GR2版本,但公司最近有个升级计划,把这套数据库升级到当下最新的11GR2,这种大版本间升级动作即为Upgrade。根据公司计划在原厂工程师和DBA共同努力下,数据库已升级到11GR2,当下版本为11.2.0.3.0。这时候原厂工程师推荐把最新的PSU给打上,获得老板的批准之后,我们又把数据库进行补丁包的升级,应用了PSU Patch14727310之后,数据库版本现在成为11.2.0.3.5,这个过程即是Update。
不得不再次提醒,Upgrade和Update都希望在获得原厂的支持下进行,尤其是Upgrade,这对于企业来说是个非常大的动作!
1.3.2 MOS对概念的解释
Generally patches for Clusterware, Grid Infrastructure and/or the Database are catagorized into the following:
· Patchsets
· Patchset Updates (PSUs)
· Critical Patch Updates (CPUs)
· Bundle Patches
· Interim (one-off) Patches
1.3.2.1 Patchsets Q&A
一、 What's a Patchset?Compared to all other patch types, a Patchset is released the least frequently. It contains fixes for most known issues for the release and potentially also introduces new features. A patchset is cumulative and when applied it changes the fourth digit of the product release banner - for example, 10.2.0.5 is 4th patch set for 10.2, and 11.2.0.2 is the 1st patch set for 11.2.
A patchset must be installed via the Oracle Universal Installer (OUI) and is generally considered an "upgrade".
Prior to 11gR2, a base release had to be installed before a patchset could be applied. For example, to install 10.2.0.5 on Linux, the 10.2.0.1 base release has to be installed first and then upgraded to 10.2.0.5.
Prior to 11gR2, the same patchset download is used to patch the Clusterware, ASM and Database homes. For example, Patch 8202632 is the 10.2.0.5 patchset, this same patch (Patch 8202632) will be used to patch the 10.2.0.x Clusterware, 10.2.0.x ASM and 10.2.0.x Database to 10.2.0.5.
Starting with 11gR2, patchset releases are now full releases and no longer require a "base" release, e.g. 11.2.0.2 can be installed directly without having to install 11.2.0.1 first.
Prior to 11gR2 - even though the CRS and RDBMS base releases were provided on separate media (downloadable zip file or separate DVD/CD) - the patchsets for both products were delivered as one i.e. the same patchset could be applied to the CRS as well as the RDBMS home.
Starting with 11gR2 the patchsets for Grid Infrastructure and RDBMS are delivered separately (as they are full releases).
Clusterware patchsets can be applied in a rolling fashion, while database patchsets cannot. For example, you can rolling upgrade clusterware to 11.2.0.2, but you have to shutdown database on all nodes to upgrade to database 11.2.0.2.
1.3.2.2 Patch Set Updates (PSUs) Q&A
一、 What's a Patch Set Update (PSU)?As the name implies PSUs are patches that are applied on top of a given patchset release. They are released on a quarterly basis and contain fixes for known critical issues for the patchset. PSUs are subject to thorough testing and do not include changes that would alter the functionality of the software. With this in mind, PSUs are designed to provide "low risk" and "high value" allowing for customers to more easily adopt proactive patching strategies. Consider the following PSU facts:
· All PSUs are installed via "opatch" and are not considered an "upgrade".
· Database PSUs always contain the CPU for the respective quarter that the PSU is released in. PSUs and CPUs are NOT compatible meaning if you apply the 11.2.0.2.2 Database PSU and then want to apply the 11.2.0.2 July CPU this would result in the rollback of the 11.2.0.2.2 Database PSU. That said, once a PSU patching strategy is adopted it must be maintained.
· Independent PSUs are released for both the Database and Clusterware or Grid Infrastructure installations.
o Clusterware PSUs (pre-11.2) are refered to as CRS PSUs
o Grid Infrastructure PSUs are refered to as GI PSUs
§ GI PSUs do contain the Database PSU for the corresponding release, e.g. 11.2.0.2.3 GI PSU contains the 11.2.0.2.3 Database PSU
o Database PSUs hold true to their name
· Both Clusterware/Grid Infrastructure and Database PSU patches are cumulative. Clusterware PSU refers to CRS PSU for pre-11gR2 and GI PSU for 11gR2.
· GI PSUs are always cumulative meaning that you can apply higher version GI PSU directly without having to apply a lower version one first. For example, the 11.2.0.2.2 GI PSU can be applied to a 11.2.0.2 home without having to apply GI PSU 11.2.0.2.1 first.
· Database PSUs can be subject to overlay PSU packaging. In these cases, the PSUs are still cumulative, but a higher PSU may require a lower PSU to be applied first; for example, to apply database PSU 10.2.0.4.7, you must apply database PSU 10.2.0.4.4 first. If a previous PSU is a prerequisite to a later PSU the requirement will be clearly documented in the PSU readme.
· For more information on PSUs please review Document 854428.1.
二、 What's the PSU release schedule?Generally speaking PSU are released on quarterly basis for both Clusterware/Grid Infrastructure and Database. There's cases where a Clusterware PSUs is not released for corresponding Database PSU. For example, there's database PSU 10.2.0.5.4 but no CRS PSU 10.2.0.5.4.
三、 Will the 5th digit of the version be changed after PSU is applied?A PSU will not physically update the 5th-digit of the release information, the updates to the 5th digit in the release are for Documentation purposes only. So the third GI PSU that was released for 11.2.0.2 will have a documentation version of 11.2.0.2.3. You will NOT see this change reflected in the actual software version if you query it from the inventory, clusterware or database.
四、 What's included in a GI PSU ?Unlike other Grid Infrastructure patches (discussed later), 11gR2 GI PSUs contains both GI PSU and Database PSU (YES, both GI and DB PSU) for a particular quarter. For example, 11.2.0.2.2 GI PSU contains both the 11.2.0.2.2 GI PSU and the 11.2.0.2.2 Database PSU.
You are able to take note of this when you extract a GI PSU, you will see 2 directories (named with the Patch number) one for the GI PSU and one for the RDBMS PSU.
How do I find out whether a bug is fixed in a Clusterware or Grid Infrastructure PSU ? To find out, check the patch readme and the following notes:
Document 405820.1 - 10.2 CRS PSU Known issues
Document 810663.1 - 11.1 CRS PSU Known issues
Document 1082394.1 - 11.2.0.1 GI PSU Known issues
Document 1272288.1 - 11.2.0.2 GI PSU Known Issues
Document 1508641.1 - 11.2.0.3.x Grid Infrastructure Bundle/PSU Known Issues
Once the GI PSU is applied, "opatch lsinventory" will show that both GI PSU and DB PSU are applied, i.e.:
Interim patches (2) :
Patch 9654983 : applied on Thu Feb 02 20:36:47 PST 2012
Patch 9655006 : applied on Thu Feb 02 20:35:53 PST 2012
And "opatch lsinventory -bugs_fixed" will list each individual bugs that have been fixed by all installed patches, i.e.:
List of Bugs fixed by Installed Patches:
Bug Fixed by Installed at Description
Patch
--- -------- ------------ -----------
7519406 9654983 Thu Feb 02 20:36:47 PST 2012 'J000' TRACE FILE REGARDING GATHER_STATS_JOB INTER
..
9783609 9655006 Thu Feb 02 20:35:53 PST 2012 CRS 11.2.0.1.0 Bundle
五、 Can a Database PSU be applied to a clusterware home?
No, only CRS PSUs, GI PSUs or other Clusterware/GI patches can be applied to a Clusterware/GI home.
1.3.2.3 Critical Patch Updates (CPUs) Q&A
一、 What are Critical Patch Updates (CPUs)?CPU Patches are collection of high-priority fixes for security related issues and are only applicable to the Database Home (and pre-11.2 ASM Home(s)) . CPUs are released quarterly on the same cycle as PSUs and are cumulative with respect to prior security fixes but may contain other fixes in order to address patch conflicts with non-security patches. PSUs always contain the CPU for that respective quarter. PSUs and CPUs are NOT compatible meaning if you apply the 11.2.0.2.2 Database PSU and then want to apply the 11.2.0.2 July CPU this would result in the rollback of the 11.2.0.2.2 Database PSU. That said, once a PSU patching strategy is adopted it must be maintained. PSU patching is preferred over CPU Patching.
1.3.2.4 Bundle Patches Q&A
一、 What's the difference between a Clusterware/Grid Infrastructure bundle patch and a PSU?A Clusterware or Grid Infrastructure (GI) patch can be in the form of bundle or Patchset Update (PSU). The biggest difference between a GI/Clusterware bundle and a PSU is that PSUs are bound to a quarterly release schedule while a bundle may be released at any time throughout the course of a given quarter. If a GI/Clusterware bundle is released in a given quarter, the fixes in that bundle will be included in the PSU that will be released for that quarter. This concept allows for development to provide critical bug fixes in a more granular timeline if necessary.
1.3.2.5 Interim (one-off) Patch Q&A
一、 What's an interim patch (one-off patch)?An interim patch contains fixes for one or in some cases several bugs (merge patch).
Clusterware interim patches are rare, they usually are build on top of the latest PSU (at the time) and include the entire PSU they were built on.
The same does not hold true for database interim patches, they usually do not include a PSU.
An interim clusterware patch on top of a PSU includes the PSU, for example, 11.2.0.2.2 patch 12647618 includes 11.2.0.2 GI PSU2 (11.2.0.2.2). But the same is not true for database interim patch, for example, 11.2.0.2.2 databasepatch 11890804 can only be applied on top of a 11.2.0.2.2 database home.
1.3.2.6 General Patch Q&A
一、 What's the difference between Clusterware/Grid Infrastructure patches and Database patches?Generally speaking Clusterware/Grid Infrastructure patches modify files that belong to the Clusterware or Grid Infrastructure product, while Database patches change files that belong to the database product. As they apply to different sets of files, they do not conflict with each other.
Please note:
· "files" in this context can refer to binaries/executables, scripts, libraries etc
· Clusterware files can reside in all types of Oracle software homes like clusterware home, database home and ASM home
· Prior to 11gR2, RDBMS files reside in DB/ASM homes only, while with 11gR2 RDBMS files will also reside in the GI home (as ASM is now part of GI)
· A GI PSU is a special type of clusterware patch as it also includes a database PSU and modifies database binaries.
1.3.3 安装PSU的一般性步骤
每个PSU安装包中都包含一个README.html或README.TXT文档,其中描述了如何安装该PSU,有些PSU是可以直接安装的,而有些PSU则必须要求安装了上一个版本的PSU之后才能继续安装。比如对于10.2.0.4版本的数据库来说,PSU 10.2.0.4.4可以直接安装在最原始的10.2.0.4.0版本中,而最新的PSU 10.2.0.4.8则必须要求先安装10.2.0.4.4。这些信息在README.html中都可以找到,所以请仔细阅读该文档。
通常安装PSU是比较简单的,步骤如下:
1) 安装PSU需要使用到opatch,在README.html中有描述该PSU需要的最低版本opatch,如果当前opatch版本过低,则需要先下载 Patch 6880880,该Patch中包含最新的opatch,只需要解压覆盖原先的$ORACLE_HOME/OPatch目录即可。
查看当前的opatch版本,可以使用opatch version命令。
$ opatch version
Invoking OPatch 10.2.0.5.2
OPatch Version: 10.2.0.5.2
OPatch succeeded.
2)安装PSU,请仔细阅读README.html,确认安装命令,通常是简单的opatch apply。
$opatch apply
3)更新数据库,将修改过的SQL文件应用到数据库中,很多DBA在执行完上述安装命令以后就不再进行这一步,那么实际上PSU是没有完整安装的。
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
注意:如果PSU是overlay PSU,比如10.2.0.4.8,则需要执行@catbundle.sql opsu apply,同样这些在README.html中都有详细描述。
1.3.4 如何确认当前数据库已经安装了什么PSU/CPU?
数据库版本 sqlplus -v
检查数据库PSU号命令为su - oracle -> opatch lsinventory
集群数据库
10205版本,CRS为PSU2,补丁号为9952245 | DB有PSU3,补丁号为11724962、DB有PSU6,补丁号为13343471、DB有PSU7,补丁号为13632743
10205版本单库无CRS,只有DB的PSU,如:DB有PSU3,补丁号为11724962、DB有PSU6,补丁号为13343471、DB有PSU7,补丁号为13632743
11G单库或集群都有GI和DB PSU,opatch lsinventory显示具体的PSU号,如:
--------------------------------------------------------------------------------------------------
Patch 13923374 : applied on Tue Sep 04 10:53:32 GMT+08:00 2012
Unique Patch ID: 14912546
Patch description: "Database Patch Set Update : 11.2.0.3.3 (13923374)" ---->DB PSU3补丁
Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)" ---->DB PSU2补丁
Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)" ---->DB PSU1补丁
Patch 13919095 : applied on Tue Sep 04 10:50:02 GMT+08:00 2012
Unique Patch ID: 14912546
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.3.3 (13919095)" ---->GI PSU3补丁
---------------------------------------------------------------------------------------------------
上面的例子是11203版本的集群,DB安装了PSU1、PSU2、PSU3,取最大PSU号,即DB为PSU3,PSU3包括PSU2、PSU1,GI为PSU3
不同的版本类推即可!!!
opatch lsinventory -bugs_fixed | grep 'PSU'
opatch lsinv
opatch lspatches
[ZFLHRDB1:grid]:/home/grid>opatch lspatches
13343438;Database Patch Set Update : 11.2.0.3.1 (13343438)
13348650;Grid Infrastructure Patch Set Update : 11.2.0.3.1 (13348650)
[ZFLHRDB1:grid]:/home/grid>
col action_time for a30
col action for a10
col namespace for a10
col version for a10
col bundle_series for a10
col comments for a30
SELECT to_char(action_time, 'YYYY-MM-DD HH24:MI:SS') action_time,
action,
namespace,
version,
id,
bundle_series,
comments
FROM dba_registry_history D;
---------------------------------------------------------------------------------------------------------------------
第二章 PSU升级正文部分
2.1 准备工作
2.1.1 数据库环境
项目 |
SOURCE DB |
PSU DB |
db 类型 |
rac |
rac |
db version |
11.2.0.3.0 |
11.2.0.3.5 |
grid version |
11.2.0.3.0 |
11.2.0.3.5 |
opatch version |
11.2.0.1.7 |
11.2.0.3.12 |
db 存储 |
ASM |
ASM |
主机IP地址/hosts配置 |
33.155.174.171 ZHLHRDB1 33.155.174.172 ZHLHRDB2 33.155.174.173 ZHLHRDB1-vip 33.155.174.174 ZHLHRDB2-vip 33.155.174.175 ZHLHRDB-scan 133.155.174.171 ZHLHRDB1-priv 133.155.174.172 ZHLHRDB2-priv |
33.155.174.171 ZHLHRDB1 33.155.174.172 ZHLHRDB2 33.155.174.173 ZHLHRDB1-vip 33.155.174.174 ZHLHRDB2-vip 33.155.174.175 ZHLHRDB-scan 133.155.174.171 ZHLHRDB1-priv 133.155.174.172 ZHLHRDB2-priv |
OS版本及kernel版本 |
AIX 64位 6100-07-05-1228 |
AIX 64位 6100-07-05-1228 |
OS hostname |
ZHLHRDB1 ZHLHRDB2 |
ZHLHRDB1 ZHLHRDB2 |
platform_name |
AIX-Based Systems (64-bit) |
AIX-Based Systems (64-bit) |
字符集 |
ZHS16GBK |
ZHS16GBK |
compatible |
11.2.0.0.0 |
11.2.0.0.0 |
归档模式 |
Archive Mode |
Archive Mode |
ORACLE_SID |
oralhr1/oralhr2 |
oralhr1/oralhr2 |
db_name/GLOBAL_DBNAME/db_unique_name |
oralhr |
oralhr |
磁盘组 |
+DATA1 |
+DATA1 |
归档路径 |
GPFS方式共享路径: /arch |
GPFS方式共享路径: /arch |
ORACLE_HOME |
/oracle/app/oracle/product/11.2.0/db |
/oracle/app/oracle/product/11.2.0/db |
dbid |
4080341205 |
4080341205 |
注:标红的选项是必填,且需要特别关注的项目 |
2.1.2 软件准备
我们需要准备的软件如下表格所示,至于这些内容怎么来的我们不要急,且看下边的MOS上下载安装软件:
项目 |
SOURCE DB |
OPatch version |
根据readme.html要求为11.2.0.3.0 or later,这里我们下载的是11.2.0.3.12,,具体文件为p6880880_112000_AIX64-5L.zip |
GI PSU |
patch号为14727347 (11.2.0.3.5),具体文件为p14727347_112030_AIX64-5L.zip |
说明:GI PSU包括DB PSU,CPU。
2.1.2.1 MOS上下载安装软件
一、 PSU下载
首先我们登录MOS
网站,https://support.oracle.com,然后查找文档号为:1922396.1,找到11.2.0.3,如下图所示:
或者文档ID 1922396.1的文件小麦苗已经下载下来了,大家可以去http://blog.itpub.net/26736162/viewspace-1624453进行下载,不止如此,小麦苗还把其他需要阅读的文档也下载下来了,可以去云盘下载。
找到11.2.0.3.5,由于我们是rac环境,所以下载GI PSU即可,所以对应的就是 14727347 (11.2.0.3.5),如上图中所示,点击相应的连接进入下载页面,然后在右边选择我们需要的平台,AIX 64位,如下图所示:
复制连接地址到迅雷或直接点击即可下载。
接下来就是等PSU下载完成后,我们用2345好压软件或其它解压缩软件打开,把其中的readme.html文件先拿出来,
打开:
该文件即PSU5的安装说明文档,我们接下来安装这个文档来安装就可以了。
二、 OPatch下载
我们从上边的readme.html中得到opatch的最低要求是11.2.0.3.0,而目前我们的版本为11.2.0.1.7,所以需要下载最新版本,下载的地址下图中也有连接即6880880,如图所示:
我们也可以直接去OPatch下载地址:
https://updates.oracle.com/download/6880880.html
https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880
打开相应的连接后,需选择我们需要的平台:
接下来下载即可。
2.2 上传软件到/softtmp目录并赋权
首先利用SecureFX软件上传下载的文件p14727347_112030_AIX64-5L.zip和p6880880_112000_AIX64-5L.zip到/softtmp目录,然后赋权。
[ZHLHRDB1:root]:/softtmp>chmod 777 p*
[ZHLHRDB1:root]:/softtmp>l
total 2425568
drwxr-xr-x 2 root system 256 May 05 15:31 lost+found
-rwxrwxrwx 1 oracle dba 1187252238 May 17 09:44 p14727347_112030_AIX64-5L.zip
-rwxrwxrwx 1 root system 54636538 May 16 22:13 p6880880_112000_AIX64-5L.zip
[ZHLHRDB1:root]:/softtmp>
2.3 更新2个节点的OPatch版本,必须要更新
说明:分别在两个节点更新GRID_HOME和ORACLE_HOME的OPatch版本。
2.3.1 备份OPatch目录
分别对grid和oracle用户下的OPatch目录进行备份:
[ZHLHRDB1:root]:/softtmp>su - oracle
[ZHLHRDB1:oracle]:/oracle>echo $ORACLE_HOME
/oracle/app/oracle/product/11.2.0/db
[ZHLHRDB1:oracle]:/oracle>su - grid
grid's Password:
[ZHLHRDB1:grid]:/home/grid>echo $ORACLE_HOME
/oracle/app/11.2.0/grid
[ZHLHRDB1:grid]:/home/grid>exit
[ZHLHRDB1:oracle]:/oracle>exit
[ZHLHRDB1:root]:/softtmp>
[ZHLHRDB1:root]:/softtmp>cp -r /oracle/app/oracle/product/11.2.0/db/OPatch /oracle/app/oracle/product/11.2.0/db/OPatch_bk
[ZHLHRDB1:root]:/softtmp>cp -r /oracle/app/11.2.0/grid/OPatch /oracle/app/11.2.0/grid/OPatch_bk
[ZHLHRDB1:root]:/softtmp>
2.3.2 grid目录OPatch替换
[ZHLHRDB1:root]:/softtmp>su - grid
[ZHLHRDB1:grid]:/home/grid>which opatch
/oracle/app/11.2.0/grid/OPatch/opatch
[ZHLHRDB1:grid]:/home/grid>opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
[ZHLHRDB1:grid]:/home/grid>unzip /softtmp/p6880880_112000_AIX64-5L.zip -d $ORACLE_HOME
Archive: /softtmp/p6880880_112000_AIX64-5L.zip
extracting: /oracle/app/11.2.0/grid/OPatch/version.txt
replace /oracle/app/11.2.0/grid/OPatch/opatch.bat? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
inflating: /oracle/app/11.2.0/grid/OPatch/opatch.bat
inflating: /oracle/app/11.2.0/grid/OPatch/opatchprereqs/opatch/opatch_prereq.xml
inflating: /oracle/app/11.2.0/grid/OPatch/opatchprereqs/opatch/rulemap.xml
inflating: /oracle/app/11.2.0/grid/OPatch/opatchprereqs/opatch/runtime_prereq.xml
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
inflating: /oracle/app/11.2.0/grid/OPatch/oplan/jlib/EMrepoDrivers.jar
inflating: /oracle/app/11.2.0/grid/OPatch/oplan/jlib/bundle.jar
inflating: /oracle/app/11.2.0/grid/OPatch/oplan/README.txt
inflating: /oracle/app/11.2.0/grid/OPatch/opatchdiag
[ZHLHRDB1:grid]:/home/grid>which opatch
/oracle/app/11.2.0/grid/OPatch/opatch
[ZHLHRDB1:grid]:/home/grid>opatch version
OPatch Version: 11.2.0.3.12 ====》grid用户的OPatch软件升级成功
OPatch succeeded.
[ZHLHRDB1:grid]:/home/grid>
2.3.3 oracle目录OPatch替换
[ZHLHRDB1:root]:/softtmp>su - oracle
[ZHLHRDB1:oracle]:/oracle>which opatch
/oracle/app/oracle/product/11.2.0/db/OPatch/opatch
[ZHLHRDB1:oracle]:/oracle>opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
[ZHLHRDB1:oracle]:/oracle>unzip /softtmp/p6880880_112000_AIX64-5L.zip -d $ORACLE_HOME
Archive: /softtmp/p6880880_112000_AIX64-5L.zip
extracting: /oracle/app/oracle/product/11.2.0/db/OPatch/version.txt
replace /oracle/app/oracle/product/11.2.0/db/OPatch/opatch.bat? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
inflating: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch.bat
inflating: /oracle/app/oracle/product/11.2.0/db/OPatch/opatchprereqs/opatch/opatch_prereq.xml
inflating: /oracle/app/oracle/product/11.2.0/db/OPatch/opatchprereqs/opatch/rulemap.xml
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
inflating: /oracle/app/oracle/product/11.2.0/db/OPatch/oplan/jlib/bundle.jar
inflating: /oracle/app/oracle/product/11.2.0/db/OPatch/oplan/README.txt
inflating: /oracle/app/oracle/product/11.2.0/db/OPatch/opatchdiag
[ZHLHRDB1:oracle]:/oracle>opatch version
OPatch Version: 11.2.0.3.12 ====》grid用户的OPatch软件升级成功
OPatch succeeded.
2.4 root用户分别在节点1和节点2生成ocm.rsp文件
The OPatch utility will prompt for your OCM (Oracle Configuration Manager) response file when it is run. You should enter a complete path of OCM response file if you already have created this in your environment. OCM response file is required and is not optional.
[ZHLHRDB1:root]:/softtmp>$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /softtmp/ocm_11gR2_psu5_lhr.rsp
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
The OCM configuration response file (/softtmp/ocm_11gR2_psu5_lhr.rsp) was successfully created.
[ZHLHRDB1:root]:/softtmp>l
total 2425576
drwxr-xr-x 2 root system 256 May 05 15:31 lost+found
-rw-r--r-- 1 root system 621 May 17 10:10 ocm_11gR2_psu5_lhr.rsp
-rwxrwxrwx 1 oracle dba 1187252238 May 17 09:44 p14727347_112030_AIX64-5L.zip
-rwxrwxrwx 1 root system 54636538 May 16 22:13 p6880880_112000_AIX64-5L.zip
[ZHLHRDB1:root]:/softtmp>
2.5 开始升级GI PSU软件包
说明:一定要按照顺序一个节点一个节点的打,会同时升级当前节点的GRID和DB SOFTWARE。
2.5.1 解压PSU包
首先升级节点一:
[ZHLHRDB1:root]:/softtmp>mkdir psu5
[ZHLHRDB1:root]:/softtmp>l
total 2425576
drwxr-xr-x 2 root system 256 May 05 15:31 lost+found
-rw-r--r-- 1 root system 621 May 17 10:10 ocm_11gR2_psu5_lhr.rsp
-rwxrwxrwx 1 oracle dba 1187252238 May 17 09:44 p14727347_112030_AIX64-5L.zip
-rwxrwxrwx 1 root system 54636538 May 16 22:13 p6880880_112000_AIX64-5L.zip
drwxr-xr-x 2 root system 256 May 17 10:17 psu5
[ZHLHRDB1:root]:/softtmp>unzip p14727347_112030_AIX64-5L.zip -d ./psu5/
Archive: p14727347_112030_AIX64-5L.zip
creating: ./psu5/14727310/
creating: ./psu5/14727310/14727310/
creating: ./psu5/14727310/14727310/etc/
creating: ./psu5/14727310/14727310/etc/xml/
inflating: ./psu5/14727310/14727310/etc/xml/ShiphomeDirectoryStructure.xml
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
inflating: ./psu5/15876003/files/srvm/lib/ins_srvm.mk
creating: ./psu5/15876003/files/inventory/
creating: ./psu5/15876003/files/inventory/Scripts/
creating: ./psu5/15876003/files/inventory/Scripts/ext/
creating: ./psu5/15876003/files/inventory/Scripts/ext/jlib/
inflating: ./psu5/15876003/files/inventory/Scripts/ext/jlib/cvu.jar
inflating: ./psu5/README.html
extracting: ./psu5/README.txt
inflating: ./psu5/bundle.xml
[ZHLHRDB1:root]:/softtmp>l
total 2425576
drwxr-xr-x 2 root system 256 May 05 15:31 lost+found
-rw-r--r-- 1 root system 621 May 17 10:10 ocm_11gR2_psu5_lhr.rsp
-rwxrwxrwx 1 oracle dba 1187252238 May 17 09:44 p14727347_112030_AIX64-5L.zip
-rwxrwxrwx 1 root system 54636538 May 16 22:13 p6880880_112000_AIX64-5L.zip
drwxr-xr-x 4 root system 256 May 17 10:18 psu5
[ZHLHRDB1:root]:/softtmp>chmod -R 777 psu5
[ZHLHRDB1:root]:/softtmp>l ./psu5
total 128
drwxrwxrwx 7 root system 256 Jan 12 2013 14727310
drwxrwxrwx 5 root system 256 Jan 12 2013 15876003
-rwxrwxrwx 1 root system 54667 Jan 14 2013 README.html
-rwxrwxrwx 1 root system 21 Jan 12 2013 README.txt
-rwxrwxrwx 1 root system 450 Jan 12 2013 bundle.xml
[ZHLHRDB1:root]:/softtmp>
2.5.2 测试兼容性
Before beginning patch application, check the consistency of inventory information for GI home and each database home to be patched. Run the following command as respective Oracle home owner to check the consistency.
分别对oracle和grid用户进行检查:
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /softtmp/psu5 -oh $ORACLE_HOME
其实在安装过程中也会自动校验是否有冲突,若有冲突也会退出安装的。
[ZHLHRDB1:oracle]:/oracle>$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0/db
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/11.2.0/db/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.3.0
Log file location : /oracle/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/opatch2016-05-17_10-35-15AM_1.log
Lsinventory Output file location : /oracle/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2016-05-17_10-35-15AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: ZHLHRDB1
ARU platform id: 212
ARU platform description:: IBM_AIX
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
Installed Products (136):
Agent Required Support Files 10.2.0.4.3
Assistant Common Files 11.2.0.3.0
Bali Share 1.1.18.0.0
Buildtools Common Files 11.2.0.3.0
Character Set Migration Utility 11.2.0.3.0
Cluster Verification Utility Common Files 11.2.0.3.0
Database Configuration and Upgrade Assistants 11.2.0.3.0
Database SQL Scripts 11.2.0.3.0
Database Workspace Manager 11.2.0.3.0
Deinstallation Tool 11.2.0.3.0
Enterprise Edition Options 11.2.0.3.0
Enterprise Manager Agent 10.2.0.4.3
Enterprise Manager Agent Core Files 10.2.0.4.4
Enterprise Manager Common Core Files 10.2.0.4.4
Enterprise Manager Common Files 10.2.0.4.3
Enterprise Manager Database Plugin -- Agent Support 11.2.0.3.0
Enterprise Manager Database Plugin -- Repository Support 11.2.0.3.0
Enterprise Manager Grid Control Core Files 10.2.0.4.4
Enterprise Manager plugin Common Files 11.2.0.3.0
Enterprise Manager Repository Core Files 10.2.0.4.4
Exadata Storage Server 11.2.0.1.0
Expat libraries 2.0.1.0.1
Generic Connectivity Common Files 11.2.0.3.0
HAS Common Files 11.2.0.3.0
HAS Files for DB 11.2.0.3.0
Installation Common Files 11.2.0.3.0
Installation Plugin Files 11.2.0.3.0
Installer SDK Component 11.2.0.3.0
JAccelerator (COMPANION) 11.2.0.3.0
LDAP Required Support Files 11.2.0.3.0
OLAP SQL Scripts 11.2.0.3.0
Oracle 11g Warehouse Builder Required Files 11.2.0.3.0
Oracle Advanced Security 11.2.0.3.0
Oracle Application Express 11.2.0.3.0
Oracle Call Interface (OCI) 11.2.0.3.0
Oracle Clusterware RDBMS Files 11.2.0.3.0
Oracle Code Editor 1.2.1.0.0I
Oracle Configuration Manager 10.3.5.0.1
Oracle Configuration Manager Client 10.3.2.1.0
Oracle Configuration Manager Deconfiguration 10.3.1.0.0
Oracle Containers for Java 11.2.0.3.0
Oracle Core Required Support Files 11.2.0.3.0
Oracle Data Mining RDBMS Files 11.2.0.3.0
Oracle Database 11g 11.2.0.3.0
Oracle Database 11g 11.2.0.3.0
Oracle Database 11g Multimedia Files 11.2.0.3.0
Oracle Database Deconfiguration 11.2.0.3.0
Oracle Database Gateway for ODBC 11.2.0.3.0
Oracle Database User Interface 2.2.13.0.0
Oracle Database Utilities 11.2.0.3.0
Oracle Database Vault J2EE Application 11.2.0.3.0
Oracle Database Vault option 11.2.0.3.0
Oracle DBCA Deconfiguration 11.2.0.3.0
Oracle Display Fonts 9.0.2.0.0
Oracle Enterprise Manager Console DB 11.2.0.3.0
Oracle Extended Windowing Toolkit 3.4.47.0.0
Oracle Globalization Support 11.2.0.3.0
Oracle Globalization Support 11.2.0.3.0
Oracle Help For Java 4.2.9.0.0
Oracle Help for the Web 2.0.14.0.0
Oracle Ice Browser 5.2.3.6.0
Oracle Internet Directory Client 11.2.0.3.0
Oracle Java Client 11.2.0.3.0
Oracle JDBC Server Support Package 11.2.0.3.0
Oracle JDBC/OCI Instant Client 11.2.0.3.0
Oracle JDBC/THIN Interfaces 11.2.0.3.0
Oracle JFC Extended Windowing Toolkit 4.2.36.0.0
Oracle JVM 11.2.0.3.0
Oracle Label Security 11.2.0.3.0
Oracle LDAP administration 11.2.0.3.0
Oracle Locale Builder 11.2.0.3.0
Oracle Message Gateway Common Files 11.2.0.3.0
Oracle Multimedia 11.2.0.3.0
Oracle Multimedia Annotator 11.2.0.3.0
Oracle Multimedia Client Option 11.2.0.3.0
Oracle Multimedia Java Advanced Imaging 11.2.0.3.0
Oracle Multimedia Locator 11.2.0.3.0
Oracle Multimedia Locator RDBMS Files 11.2.0.3.0
Oracle Net 11.2.0.3.0
Oracle Net Listener 11.2.0.3.0
Oracle Net Required Support Files 11.2.0.3.0
Oracle Net Services 11.2.0.3.0
Oracle Netca Client 11.2.0.3.0
Oracle Notification Service 11.2.0.3.0
Oracle Notification Service (eONS) 11.2.0.3.0
Oracle ODBC Driver 11.2.0.3.0
Oracle ODBC Driverfor Instant Client 11.2.0.3.0
Oracle OLAP 11.2.0.3.0
Oracle OLAP API 11.2.0.3.0
Oracle OLAP RDBMS Files 11.2.0.3.0
Oracle One-Off Patch Installer 11.2.0.1.7
Oracle Partitioning 11.2.0.3.0
Oracle Programmer 11.2.0.3.0
Oracle Quality of Service Management (Client) 11.2.0.3.0
Oracle RAC Deconfiguration 11.2.0.3.0
Oracle RAC Required Support Files-HAS 11.2.0.3.0
Oracle Real Application Testing 11.2.0.3.0
Oracle Recovery Manager 11.2.0.3.0
Oracle Security Developer Tools 11.2.0.3.0
Oracle Spatial 11.2.0.3.0
Oracle SQL Developer 11.2.0.3.0
Oracle Starter Database 11.2.0.3.0
Oracle Text 11.2.0.3.0
Oracle Text Required Support Files 11.2.0.3.0
Oracle UIX 2.2.24.6.0
Oracle Universal Connection Pool 11.2.0.3.0
Oracle Universal Installer 11.2.0.3.0
Oracle USM Deconfiguration 11.2.0.3.0
Oracle Wallet Manager 11.2.0.3.0
Oracle XML Development Kit 11.2.0.3.0
Oracle XML Query 11.2.0.3.0
Parser Generator Required Support Files 11.2.0.3.0
Perl Interpreter 5.10.0.0.2
Perl Modules 5.10.0.0.1
PL/SQL 11.2.0.3.0
PL/SQL Embedded Gateway 11.2.0.3.0
Platform Required Support Files 11.2.0.3.0
Precompiler Common Files 11.2.0.3.0
Precompiler Required Support Files 11.2.0.3.0
Provisioning Advisor Framework 10.2.0.4.3
RDBMS Required Support Files 11.2.0.3.0
RDBMS Required Support Files for Instant Client 11.2.0.3.0
RDBMS Required Support Files Runtime 11.2.0.3.0
regexp 2.1.9.0.0
Required Support Files 11.2.0.3.0
Sample Schema Data 11.2.0.3.0
Secure Socket Layer 11.2.0.3.0
SQL*Plus 11.2.0.3.0
SQL*Plus Files for Instant Client 11.2.0.3.0
SQL*Plus Required Support Files 11.2.0.3.0
SQLJ Runtime 11.2.0.3.0
SSL Required Support Files for InstantClient 11.2.0.3.0
Sun JDK 1.5.0.12.4
XDK Required Support Files 11.2.0.3.0
XML Parser for Java 11.2.0.3.0
XML Parser for Oracle JVM 11.2.0.3.0
There are 136 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = ZHLHRDB1
Remote node = ZHLHRDB1
Remote node = ZHLHRDB2
--------------------------------------------------------------------------------
OPatch succeeded.
[ZHLHRDB1:oracle]:/oracle>
[ZHLHRDB1:oracle]:/oracle>$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /softtmp/psu5 -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/oracle/product/11.2.0/db
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/11.2.0/db/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.3.0
Log file location : /oracle/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/opatch2016-05-17_10-35-23AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[ZHLHRDB1:oracle]:/oracle>
oracle检查成功不存在冲突,下边对grid进行检查:
[ZHLHRDB1:oracle]:/oracle>su - grid
grid's Password:
[ZHLHRDB1:grid]:/home/grid>$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/11.2.0/grid
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.3.0
Log file location : /oracle/app/11.2.0/grid/cfgtoollogs/opatch/opatch2016-05-17_10-36-01AM_1.log
Lsinventory Output file location : /oracle/app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2016-05-17_10-36-01AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: ZHLHRDB1
ARU platform id: 212
ARU platform description:: IBM_AIX
Installed Top-level Products (1):
Oracle Grid Infrastructure 11.2.0.3.0
There are 1 products installed in this Oracle Home.
Installed Products (88):
Agent Required Support Files 10.2.0.4.3
Assistant Common Files 11.2.0.3.0
Automatic Storage Management Assistant 11.2.0.3.0
Bali Share 1.1.18.0.0
Buildtools Common Files 11.2.0.3.0
Character Set Migration Utility 11.2.0.3.0
Cluster Ready Services Files 11.2.0.3.0
Cluster Verification Utility Common Files 11.2.0.3.0
Cluster Verification Utility Files 11.2.0.3.0
Database SQL Scripts 11.2.0.3.0
Deinstallation Tool 11.2.0.3.0
Enterprise Manager Common Core Files 10.2.0.4.4
Enterprise Manager Common Files 10.2.0.4.3
Enterprise Manager plugin Common Files 11.2.0.3.0
Expat libraries 2.0.1.0.1
HAS Common Files 11.2.0.3.0
HAS Files for DB 11.2.0.3.0
Installation Common Files 11.2.0.3.0
Installation Plugin Files 11.2.0.3.0
Installer SDK Component 11.2.0.3.0
LDAP Required Support Files 11.2.0.3.0
OLAP SQL Scripts 11.2.0.3.0
Oracle Clusterware RDBMS Files 11.2.0.3.0
Oracle Configuration Manager Deconfiguration 10.3.1.0.0
Oracle Containers for Java 11.2.0.3.0
Oracle Core Required Support Files 11.2.0.3.0
Oracle Database 11g 11.2.0.3.0
Oracle Database 11g Multimedia Files 11.2.0.3.0
Oracle Database Deconfiguration 11.2.0.3.0
Oracle Database User Interface 2.2.13.0.0
Oracle Database Utilities 11.2.0.3.0
Oracle DBCA Deconfiguration 11.2.0.3.0
Oracle Extended Windowing Toolkit 3.4.47.0.0
Oracle Globalization Support 11.2.0.3.0
Oracle Globalization Support 11.2.0.3.0
Oracle Grid Infrastructure 11.2.0.3.0
Oracle Help For Java 4.2.9.0.0
Oracle Ice Browser 5.2.3.6.0
Oracle Internet Directory Client 11.2.0.3.0
Oracle Java Client 11.2.0.3.0
Oracle JDBC/OCI Instant Client 11.2.0.3.0
Oracle JDBC/THIN Interfaces 11.2.0.3.0
Oracle JFC Extended Windowing Toolkit 4.2.36.0.0
Oracle JVM 11.2.0.3.0
Oracle LDAP administration 11.2.0.3.0
Oracle Locale Builder 11.2.0.3.0
Oracle Multimedia 11.2.0.3.0
Oracle Multimedia Client Option 11.2.0.3.0
Oracle Multimedia Java Advanced Imaging 11.2.0.3.0
Oracle Multimedia Locator 11.2.0.3.0
Oracle Multimedia Locator RDBMS Files 11.2.0.3.0
Oracle Net 11.2.0.3.0
Oracle Net Listener 11.2.0.3.0
Oracle Net Required Support Files 11.2.0.3.0
Oracle Netca Client 11.2.0.3.0
Oracle Notification Service 11.2.0.3.0
Oracle Notification Service (eONS) 11.2.0.3.0
Oracle One-Off Patch Installer 11.2.0.1.7
Oracle Quality of Service Management (Client) 11.2.0.3.0
Oracle Quality of Service Management (Server) 11.2.0.3.0
Oracle RAC Deconfiguration 11.2.0.3.0
Oracle RAC Required Support Files-HAS 11.2.0.3.0
Oracle Recovery Manager 11.2.0.3.0
Oracle Security Developer Tools 11.2.0.3.0
Oracle Text Required Support Files 11.2.0.3.0
Oracle Universal Installer 11.2.0.3.0
Oracle USM Deconfiguration 11.2.0.3.0
Oracle Wallet Manager 11.2.0.3.0
Parser Generator Required Support Files 11.2.0.3.0
Perl Interpreter 5.10.0.0.2
Perl Modules 5.10.0.0.1
PL/SQL 11.2.0.3.0
PL/SQL Embedded Gateway 11.2.0.3.0
Platform Required Support Files 11.2.0.3.0
Precompiler Required Support Files 11.2.0.3.0
RDBMS Required Support Files 11.2.0.3.0
RDBMS Required Support Files for Instant Client 11.2.0.3.0
RDBMS Required Support Files Runtime 11.2.0.3.0
Required Support Files 11.2.0.3.0
Secure Socket Layer 11.2.0.3.0
SQL*Plus 11.2.0.3.0
SQL*Plus Files for Instant Client 11.2.0.3.0
SQL*Plus Required Support Files 11.2.0.3.0
SSL Required Support Files for InstantClient 11.2.0.3.0
Sun JDK 1.5.0.12.4
Universal Storage Manager Files 11.2.0.3.0
XDK Required Support Files 11.2.0.3.0
XML Parser for Java 11.2.0.3.0
There are 88 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = ZHLHRDB1
Remote node = ZHLHRDB1
Remote node = ZHLHRDB2
--------------------------------------------------------------------------------
OPatch succeeded.
[ZHLHRDB1:grid]:/home/grid>$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /softtmp/psu5 -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/11.2.0/grid
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.3.0
Log file location : /oracle/app/11.2.0/grid/cfgtoollogs/opatch/opatch2016-05-17_10-36-07AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[ZHLHRDB1:grid]:/home/grid>
grid用户也不存在冲突,可以安装PSU升级了。
2.5.3 升级前的PSU
opatch lsinventory -bugs_fixed | grep 'PSU'
opatch lspatches
set line 9999
col action_time for a30
col action for a10
col namespace for a10
col version for a10
col bundle_series for a10
col comments for a30
SELECT to_char(action_time, 'YYYY-MM-DD HH24:MI:SS') action_time,
action,
namespace,
version,
id,
bundle_series,
comments
FROM dba_registry_history D;
[ZHLHRDB1:oracle]:/oracle>opatch lsinventory -bugs_fixed | grep 'PSU'
[ZHLHRDB1:oracle]:/oracle>opatch lspatches
There are no Interim patches installed in this Oracle Home "/oracle/app/oracle/product/11.2.0/db".
OPatch succeeded.
[ZHLHRDB1:oracle]:/oracle>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue May 17 10:41:58 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> set line 9999
SQL> col action_time for a30
SQL> col action for a10
SQL> col namespace for a10
SQL> col version for a10
SQL> col bundle_series for a10
SQL> col comments for a30
SQL>
SQL> SELECT to_char(action_time, 'YYYY-MM-DD HH24:MI:SS') action_time,
2 action,
3 namespace,
4 version,
5 id,
6 bundle_series,
7 comments
8 FROM dba_registry_history D;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SER COMMENTS
------------------------------ ---------- ---------- ---------- ---------- ---------- ------------------------------
2011-10-21 04:48:04 APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
2016-05-05 16:36:06 APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
SQL>
2.5.4 开始升级
root用户依次节点1,节点2上执行,升级前db是open,升级的过程中是关闭状态
[ZHLHRDB1:root]:/softtmp>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.LISTENER.lsnr
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.asm
ONLINE ONLINE ZHLHRDB1 Started
ONLINE ONLINE ZHLHRDB2 Started
ora.gsd
OFFLINE OFFLINE ZHLHRDB1
OFFLINE OFFLINE ZHLHRDB2
ora.net1.network
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.ons
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.registry.acfs
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE ZHLHRDB1
ora.cvu
1 ONLINE ONLINE ZHLHRDB1
ora.oc4j
1 ONLINE ONLINE ZHLHRDB1
ora.oralhr.db
1 ONLINE ONLINE ZHLHRDB1 Open
2 ONLINE ONLINE ZHLHRDB2 Open
ora.scan1.vip
1 ONLINE ONLINE ZHLHRDB1
ora.ZHLHRDB1.vip
1 ONLINE ONLINE ZHLHRDB1
ora.ZHLHRDB2.vip
1 ONLINE ONLINE ZHLHRDB2
[ZHLHRDB1:root]:/softtmp>
[ZHLHRDB1:root]:/softtmp>opatch auto /softtmp/psu5 -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp
Executing /oracle/app/11.2.0/grid/perl/bin/perl /oracle/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /softtmp -patchn psu5 -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp -paramfile /oracle/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2016-05-17_10-44-24.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2016-05-17_10-44-24.report.log
2016-05-17 10:44:24: Starting Clusterware Patch Setup
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /oracle/app/oracle/product/11.2.0/db ...
Stopped RAC /oracle/app/oracle/product/11.2.0/db successfully
patch /softtmp/psu5/15876003/custom/server/15876003 apply successful for home /oracle/app/oracle/product/11.2.0/db
patch /softtmp/psu5/14727310 apply successful for home /oracle/app/oracle/product/11.2.0/db
Stopping CRS...
Stopped CRS successfully
patch /softtmp/psu5/15876003 apply successful for home /oracle/app/11.2.0/grid
patch /softtmp/psu5/14727310 apply successful for home /oracle/app/11.2.0/grid
Starting CRS...
CRS-4123: Oracle High Availability Services has been started.
Starting RAC /oracle/app/oracle/product/11.2.0/db ...
Started RAC /oracle/app/oracle/product/11.2.0/db successfully
opatch auto succeeded.
[ZHLHRDB1:root]:/softtmp>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.LISTENER.lsnr
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.asm
ONLINE ONLINE ZHLHRDB1 Started
ONLINE ONLINE ZHLHRDB2 Started
ora.gsd
OFFLINE OFFLINE ZHLHRDB1
OFFLINE OFFLINE ZHLHRDB2
ora.net1.network
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.ons
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.registry.acfs
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE ZHLHRDB2
ora.cvu
1 ONLINE ONLINE ZHLHRDB2
ora.oc4j
1 ONLINE ONLINE ZHLHRDB2
ora.oralhr.db
1 ONLINE ONLINE ZHLHRDB1 Open
2 ONLINE ONLINE ZHLHRDB2 Open
ora.scan1.vip
1 ONLINE ONLINE ZHLHRDB2
ora.ZHLHRDB1.vip
1 ONLINE ONLINE ZHLHRDB1
ora.ZHLHRDB2.vip
1 ONLINE ONLINE ZHLHRDB2
[ZHLHRDB1:root]:/softtmp>
升级完成后,数据库自动OPEN.
2.5.4.1 PSU升级日志
下边我们对升级过程简单分析,首先会升级DB的,该过程自动进行关闭DB:
[ZHLHRDB1:root]:/>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.LISTENER.lsnr
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.asm
ONLINE ONLINE ZHLHRDB1 Started
ONLINE ONLINE ZHLHRDB2 Started
ora.gsd
OFFLINE OFFLINE ZHLHRDB1
OFFLINE OFFLINE ZHLHRDB2
ora.net1.network
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.ons
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
ora.registry.acfs
ONLINE ONLINE ZHLHRDB1
ONLINE ONLINE ZHLHRDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE ZHLHRDB1
ora.cvu
1 ONLINE ONLINE ZHLHRDB1
ora.oc4j
1 ONLINE ONLINE ZHLHRDB1
ora.oralhr.db
1 OFFLINE OFFLINE Instance Shutdown
2 ONLINE ONLINE ZHLHRDB2 Open
ora.scan1.vip
1 ONLINE ONLINE ZHLHRDB1
ora.ZHLHRDB1.vip
1 ONLINE ONLINE ZHLHRDB1
ora.ZHLHRDB2.vip
1 ONLINE ONLINE ZHLHRDB2
[ZHLHRDB1:root]:/>
主日志文件,/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2016-05-17_10-44-24.log,详细日志:
[ZHLHRDB1:root]:/oracle/app/11.2.0/grid/cfgtoollogs/opatch>cd
[ZHLHRDB1:root]:/>cd /oracle/app/11.2.0/grid/cfgtoollogs/opatch
[ZHLHRDB1:root]:/oracle/app/11.2.0/grid/cfgtoollogs/opatch>l -lrt
total 896
-rw-r----- 1 grid dba 13094 May 17 10:26 opatch2016-05-17_10-26-28AM_1.log
-rw-r----- 1 grid dba 1343 May 17 10:29 opatch2016-05-17_10-29-00AM_1.log
-rw-r----- 1 grid dba 19352 May 17 10:29 opatch2016-05-17_10-29-11AM_1.log
-rw-r----- 1 grid dba 1334 May 17 10:31 opatch2016-05-17_10-31-30AM_1.log
-rw-r----- 1 grid dba 6140 May 17 10:32 opatch2016-05-17_10-32-46AM_1.log
-rw-r----- 1 grid dba 6140 May 17 10:33 opatch2016-05-17_10-33-09AM_1.log
-rw-r----- 1 grid dba 13094 May 17 10:36 opatch2016-05-17_10-36-01AM_1.log
-rw-r----- 1 grid dba 6140 May 17 10:36 opatch2016-05-17_10-36-07AM_1.log
-rw-r----- 1 grid dba 3324 May 17 10:40 opatch2016-05-17_10-40-04AM_1.log
drwxr-xr-x 2 grid dba 8192 May 17 10:40 lsinv
-rw-r----- 1 grid dba 1850 May 17 10:40 opatch2016-05-17_10-40-23AM_1.log
-rw-r----- 1 grid dba 1787 May 17 10:44 opatch2016-05-17_10-44-25AM_1.log
-rw-r----- 1 grid dba 2182 May 17 10:44 opatch2016-05-17_10-44-28AM_1.log
-rw-r----- 1 grid dba 2395 May 17 10:44 opatch2016-05-17_10-44-45AM_1.log
-rw-r----- 1 grid dba 2499 May 17 10:44 opatch2016-05-17_10-44-48AM_1.log
-rw-r----- 1 grid dba 2317 May 17 10:45 opatch2016-05-17_10-45-34AM_1.log
-rw-r----- 1 grid dba 3372 May 17 10:45 opatch2016-05-17_10-45-36AM_1.log
-rw-r----- 1 grid dba 2764 May 17 10:45 opatch2016-05-17_10-45-39AM_1.log
-rw-r--r-- 1 grid dba 25061 May 17 10:45 opatch_history.txt
-rw-r----- 1 grid dba 2901 May 17 10:45 opatch2016-05-17_10-45-42AM_1.log
[ZHLHRDB1:root]:/oracle/app/11.2.0/grid/cfgtoollogs/opatch>
升级CRS的时候,节点一上的ha进程就会全部停掉:
[ZHLHRDB2:root]:/softtmp>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
ONLINE ONLINE ZHLHRDB2
ora.LISTENER.lsnr
ONLINE ONLINE ZHLHRDB2
ora.asm
ONLINE ONLINE ZHLHRDB2 Started
ora.gsd
OFFLINE OFFLINE ZHLHRDB2
ora.net1.network
ONLINE ONLINE ZHLHRDB2
ora.ons
ONLINE ONLINE ZHLHRDB2
ora.registry.acfs
ONLINE ONLINE ZHLHRDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE ZHLHRDB2
ora.cvu
1 ONLINE ONLINE ZHLHRDB2
ora.oc4j
1 ONLINE ONLINE ZHLHRDB2
ora.oralhr.db
1 OFFLINE OFFLINE
2 ONLINE ONLINE ZHLHRDB2 Open
ora.scan1.vip
1 ONLINE ONLINE ZHLHRDB2
ora.ZHLHRDB1.vip
1 ONLINE INTERMEDIATE ZHLHRDB2 FAILED OVER
ora.ZHLHRDB2.vip
1 ONLINE ONLINE ZHLHRDB2
[ZHLHRDB2:root]:/softtmp>
[ZHLHRDB1:root]:/>
[ZHLHRDB1:root]:/>ps -ef|grep d.bin
root 2426158 2294074 0 10:57:38 pts/8 0:00 grep d.bin
[ZHLHRDB1:root]:/>
从详细日志/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2016-05-17_10-44-24.report.log中可以看到自动升级过程中的所有的命令,这也是手动打PSU的步骤,一共32个命令:
[ZHLHRDB1:root]:/>cat /oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2016-05-17_10-44-24.report.log
*********** Configuration Data ***********
* It shows only those targets that will be patched in this session *
crs_home=/oracle/app/11.2.0/grid owner=grid opatch_ver=11.2.0.3.12
rac_home=/oracle/app/oracle/product/11.2.0/db owner=oracle opatch_ver=11.2.0.3.12
*********** Steps to be executed as owner unless specified as root ***********
1: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch prereq CheckComponents -ph /softtmp/psu5/15876003/custom/server/15876003 -oh /oracle/app/oracle/product/11.2.0/db
2: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch prereq CheckComponents -ph /softtmp/psu5/14727310 -oh /oracle/app/oracle/product/11.2.0/db
3: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch prereq CheckConflictAgainstOH -ph /softtmp/psu5/15876003/custom/server/15876003 -oh /oracle/app/oracle/product/11.2.0/db
4: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch prereq CheckConflictAgainstOH -ph /softtmp/psu5/14727310 -oh /oracle/app/oracle/product/11.2.0/db
5: /oracle/app/11.2.0/grid/OPatch/opatch prereq CheckComponents -ph /softtmp/psu5/15876003 -oh /oracle/app/11.2.0/grid
6: /oracle/app/11.2.0/grid/OPatch/opatch prereq CheckComponents -ph /softtmp/psu5/14727310 -oh /oracle/app/11.2.0/grid
7: /oracle/app/11.2.0/grid/OPatch/opatch prereq CheckConflictAgainstOH -ph /softtmp/psu5/15876003 -oh /oracle/app/11.2.0/grid
8: /oracle/app/11.2.0/grid/OPatch/opatch prereq CheckConflictAgainstOH -ph /softtmp/psu5/14727310 -oh /oracle/app/11.2.0/grid
9: /oracle/app/oracle/product/11.2.0/db/bin/emctl stop dbconsole
10: /oracle/app/oracle/product/11.2.0/db/bin/emctl stop agent
11: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch prereq CheckApplicable -ph /softtmp/psu5/15876003/custom/server/15876003 -oh /oracle/app/oracle/product/11.2.0/db
12: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch prereq CheckApplicable -ph /softtmp/psu5/14727310 -oh /oracle/app/oracle/product/11.2.0/db
13: /oracle/app/oracle/product/11.2.0/db/bin/srvctl stop home -o /oracle/app/oracle/product/11.2.0/db -s /oracle/app/oracle/product/11.2.0/db/srvm/admin/stophome.txt -n ZHLHRDB1 -f
14: /usr/sbin/fuser -k /oracle/app/oracle/product/11.2.0/db/bin/oracle : run as root
15: /softtmp/psu5/15876003/custom/server/15876003/custom/scripts/prepatch.sh -dbhome /oracle/app/oracle/product/11.2.0/db
16: /usr/sbin/slibclean : run as root
17: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch napply /softtmp/psu5/15876003/custom/server/15876003 -local -silent -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp -oh /oracle/app/oracle/product/11.2.0/db -invPtrLoc /oracle/app/oracle/product/11.2.0/db/oraInst.loc
18: /oracle/app/oracle/product/11.2.0/db/OPatch/opatch napply /softtmp/psu5/14727310 -local -silent -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp -oh /oracle/app/oracle/product/11.2.0/db -invPtrLoc /oracle/app/oracle/product/11.2.0/db/oraInst.loc
19: /softtmp/psu5/15876003/custom/server/15876003/custom/scripts/postpatch.sh -dbhome /oracle/app/oracle/product/11.2.0/db
20: /oracle/app/11.2.0/grid/crs/install/rootcrs.pl -unlock : run as root
21: /usr/sbin/fuser -k /oracle/app/11.2.0/grid/bin/crsctl.bin : run as root
22: /oracle/app/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /softtmp/psu5/15876003 -oh /oracle/app/11.2.0/grid
23: /oracle/app/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /softtmp/psu5/14727310 -oh /oracle/app/11.2.0/grid
24: /usr/sbin/slibclean : run as root
25: /oracle/app/11.2.0/grid/OPatch/opatch napply /softtmp/psu5/15876003 -local -silent -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp -oh /oracle/app/11.2.0/grid -invPtrLoc /oracle/app/11.2.0/grid/oraInst.loc
26: /oracle/app/11.2.0/grid/OPatch/opatch napply /softtmp/psu5/14727310 -local -silent -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp -oh /oracle/app/11.2.0/grid -invPtrLoc /oracle/app/11.2.0/grid/oraInst.loc
27: /oracle/app/11.2.0/grid/bin/emctl start dbconsole
28: /oracle/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh : run as root
29: /oracle/app/11.2.0/grid/crs/install/rootcrs.pl -patch : run as root
30: /oracle/app/oracle/product/11.2.0/db/bin/emctl start dbconsole
31: /oracle/app/oracle/product/11.2.0/db/bin/emctl start agent
32: /oracle/app/oracle/product/11.2.0/db/bin/srvctl start home -o /oracle/app/oracle/product/11.2.0/db -s /oracle/app/oracle/product/11.2.0/db/srvm/admin/stophome.txt -n ZHLHRDB1
[ZHLHRDB1:root]:/>
2.5.5 检查升级情况
[ZHLHRDB1:oracle]:/oracle>
[ZHLHRDB1:oracle]:/oracle>opatch lsinventory -bugs_fixed | grep 'PSU'
12925041 15876003 Tue May 17 10:46:47 GMT+08:00 2016112024GIPSU OLOGGERD CORE DUMP AT 'CRFLOGDB.C
13079948 15876003 Tue May 17 10:46:47 GMT+08:00 2016CVU FILES NOT BEING PICKED UP FOR 11.2.0.2.4GIPSU
(INCLUDES DB PSU 11.2.0.3.1)
13396284 15876003 Tue May 17 10:46:47 GMT+08:00 201611.2.0.3 GI PSU 1 HAS-CRS TRACKING BUG
13531373 15876003 Tue May 17 10:46:47 GMT+08:00 201611.2.0.3.1GIPSU CVU CHECK FAIL FOR NETWORK
13540563 15876003 Tue May 17 10:46:47 GMT+08:00 2016MERGE REQUEST ON TOP OF 11.2.0.3.1PSU FOR BUGS
13569812 15876003 Tue May 17 10:46:47 GMT+08:00 201611.2.0.3.1GIPSU CVU FAIL TO DETERMINE IF ORACLE
NETWORK HICCUP PSU4 HAS BEEN APP
(INCLUDES DB PSU 11.2.0.3.2)
(INCLUDES DB PSU 11.2.0.3.3)
14001941 15876003 Tue May 17 10:46:47 GMT+08:00 2016DOWNGRADE ISSUE FROM 11.2.0.3.1 TO 11.2.0.2 PSU4
14271305 15876003 Tue May 17 10:46:47 GMT+08:00 201611.2.0.3.3GIPSU SIHA ORAAGENT.BIN ALWAYS CONSUME
(INCLUDES DB PSU 11.2.0.3.4)
[ZHLHRDB1:oracle]:/oracle>opatch lspatches
14727310;Database Patch Set Update : 11.2.0.3.5 (14727310)
15876003;Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)
OPatch succeeded.
[ZHLHRDB1:oracle]:/oracle>
[ZHLHRDB1:oracle]:/oracle>opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0/db
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/11.2.0/db/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.3.0
Log file location : /oracle/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/opatch2016-05-17_11-04-31AM_1.log
Lsinventory Output file location : /oracle/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2016-05-17_11-04-31AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: ZHLHRDB1
ARU platform id: 212
ARU platform description:: IBM_AIX
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
Interim patches (2) :
Patch 14727310 : applied on Tue May 17 10:49:36 GMT+08:00 2016
Unique Patch ID: 15668950
Patch description: "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Created on 31 Dec 2012, 01:47:37 hrs PST8PDT
Sub-patch 14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Bugs fixed:
12960925, 14469008, 14038787, 12834027, 12764337, 13772618, 14390252
14263036, 10133521, 13588248, 12894807, 13773133, 13742435, 12829021
13742434, 9659614, 12585543, 13742433, 13742438, 13742437, 13742436
12905058, 13503598, 12582664, 13632717, 12861463, 13343438, 13026410
13080778, 12849688, 13103913, 13457582, 13737746, 13742464, 12873183
13099577, 13645917, 13036331, 14548763, 12693626, 12656535, 12678920
13624984, 12401111, 13377816, 13338048, 12913474, 11877623, 11063191
12964067, 13250244, 12847466, 12797765, 14613900, 13038684, 12617123
14023636, 12923168, 13035360, 13420224, 12646784, 12857027, 13340388
14409183, 12583611, 12794305, 10350832, 14480674, 14480675, 14480676
12998795, 13467683, 12588744, 12594032, 13645875, 13001379, 12797420
13257247, 13787482, 14841409, 13041324, 13366202, 13385346, 13011409
13326736, 13981051, 14664355, 15862018, 15862017, 15862016, 13466801
14205448, 15862019, 12791981, 14063281, 14063280, 13362079, 13732226
13384182, 13719081, 15862020, 15862021, 15862023, 15862022, 15862024
9703627, 9858539, 12780098, 13354082, 14062797, 14062796, 14052474
14062795, 14062794, 13534412, 14062793, 14062792, 12345082, 13550185
12880299, 13502183, 13059165, 12612118, 13593999, 13916709, 13397104
13524899, 9761357, 13657605, 13936424, 9873405, 12535346, 14727310
12971775, 13696216, 13807411, 12917230, 13685544, 12938841, 13499128
14546673, 11708510, 13699124, 14040433, 14546575, 13705338, 12662040
12658411, 14262913, 12718090, 12959852, 14035825, 12919564, 12780983
12950644, 13454210, 14258925, 13544396, 13903046, 13923374, 13572659
13370330, 14275605, 13464002, 15853081, 13528551, 13612575, 14076523
12620823, 13358781, 13649031, 14263073, 14138130, 13527323, 13804294
13492735, 13332439, 13718279, 13035804, 13559697, 13448206, 13419660
13399435, 14546638, 13070939, 12845115, 12976376, 11840910, 13566938
13430938, 12748240, 12879027, 10263668, 13476583, 13484963, 13554409
Patch 15876003 : applied on Tue May 17 10:46:47 GMT+08:00 2016
Unique Patch ID: 15701232
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)"
Created on 11 Jan 2013, 08:27:57 hrs PST8PDT
Bugs fixed:
15876003, 14275572, 13919095, 13696251, 13348650, 12659561, 13039908
14277586, 13987807, 14625969, 13938166, 13825231, 13036424, 12794268
13011520, 13569812, 12758736, 13000491, 13498267, 13077654, 13001901
13550689, 13430715, 13806545, 13634583, 11675721, 14082976, 14271305
12771830, 12538907, 13947200, 12996428, 14102704, 13066371, 13483672
12594616, 13879428, 13540563, 12897651, 12897902, 13241779, 12896850
12726222, 12829429, 12728585, 13079948, 12876314, 13090686, 12925041
12995950, 13251796, 12650672, 12398492, 12848480, 13582411, 13652088
12990582, 13857364, 12975811, 12917897, 13653178, 13082238, 12947871
13037709, 13371153, 12878750, 10114953, 11772838, 13058611, 13001955
14001941, 11836951, 12965049, 13440962, 12765467, 13727853, 13425727
12885323, 14407395, 13965075, 13339443, 12784559, 14242977, 13332363
13074261, 12971251, 13811209, 12709476, 14168708, 14096821, 13993634
13460353, 13523527, 12857064, 13719731, 13396284, 12899169, 13111013
12558569, 13323698, 12867511, 12639013, 10260842, 12959140, 13085732
12829917, 10317921, 13843080, 12934171, 12849377, 12349553, 13924431
13869978, 12680491, 12914824, 13789135, 12730342, 13334158, 12950823
10418841, 12832204, 13355963, 13531373, 13776758, 12720728, 13620816
13002015, 13023609, 13024624, 12791719
Rac system comprising of multiple nodes
Local node = ZHLHRDB1
Remote node = ZHLHRDB1
Remote node = ZHLHRDB2
--------------------------------------------------------------------------------
OPatch succeeded.
[ZHLHRDB1:oracle]:/oracle>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue May 17 11:07:00 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> set line 9999
SQL> col action_time for a30
SQL> col action for a10
SQL> col namespace for a10
SQL> col version for a10
SQL> col bundle_series for a10
SQL> col comments for a30
SQL>
SQL> SELECT to_char(action_time, 'YYYY-MM-DD HH24:MI:SS') action_time,
2 action,
3 namespace,
4 version,
5 id,
6 bundle_series,
7 comments
8 FROM dba_registry_history D;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SER COMMENTS
------------------------------ ---------- ---------- ---------- ---------- ---------- ------------------------------
2011-10-21 04:48:04 APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
2016-05-05 16:36:06 APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
====》看下节点二的opatch情况
[ZHLHRDB2:oracle]:/oracle>opatch lspatches
There are no Interim patches installed in this Oracle Home "/oracle/app/oracle/product/11.2.0/db".
OPatch succeeded.
[ZHLHRDB2:oracle]:/oracle>
可以看到节点一的grid和db软件都是11.2.0.3.5了,但是数据库还不是的,这个需要等2个节点的软件都升级完毕后再执行脚本$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply才可以,下边先对节点二执行升级GI PSU后然后再升级DB实例的PUS,过程和节点一一样,这里省略,对节点二升级完成后查看:
[ZHLHRDB2:root]:/softtmp>su - oracle
[ZHLHRDB2:oracle]:/oracle>opatch lspatches
14727310;Database Patch Set Update : 11.2.0.3.5 (14727310)
15876003;Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)
OPatch succeeded.
[ZHLHRDB2:oracle]:/oracle>
2.6 升级数据库数据字典
登录任意一个实例,执行升级数据字典脚本,@$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply:
[ZHLHRDB1:root]:/>su - oracle
[ZHLHRDB1:oracle]:/oracle>
[ZHLHRDB1:oracle]:/oracle>
[ZHLHRDB1:oracle]:/oracle>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue May 17 11:33:14 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
SQL>
SQL> @$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Generating apply and rollback scripts...
Check the following file for errors:
/oracle/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_oralhr_GENERATE_2016May17_11_33_49.log
Apply script: /oracle/app/oracle/product/11.2.0/db/rdbms/admin/catbundle_PSU_oralhr_APPLY.sql
Rollback script: /oracle/app/oracle/product/11.2.0/db/rdbms/admin/catbundle_PSU_oralhr_ROLLBACK.sql
PL/SQL procedure successfully completed.
Executing script file...
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/oracle/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_oralhr_APPLY_2016May17_11_33_51.log
SQL>
SQL>
SQL> set line 9999
SQL> col action_time for a30
SQL> col action for a10
SQL> col namespace for a10
SQL> col version for a10
SQL> col bundle_series for a10
SQL> col comments for a30
SQL>
SQL> SELECT to_char(action_time, 'YYYY-MM-DD HH24:MI:SS') action_time,
2 action,
3 namespace,
4 version,
5 id,
6 bundle_series,
7 comments
8 FROM dba_registry_history D;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SER COMMENTS
------------------------------ ---------- ---------- ---------- ---------- ---------- ------------------------------
2011-10-21 04:48:04 APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
2016-05-05 16:36:06 APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
2016-05-17 11:34:14 APPLY SERVER 11.2.0.3 5 PSU PSU 11.2.0.3.5
3 rows selected.
SQL>
可以看到数据库里边数据字典也升级成功,到此PSU升级成功。
第三章 PSU总结
l 本次安装过程所涉及到的所有软件和文档阅读都可以去云盘(http://blog.itpub.net/26736162/viewspace-1624453)进行下载
l 安装PSU之前需要检查是否有冲突,$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /softtmp/psu5 -oh $ORACLE_HOME,若有冲突需要先回滚掉以前的patch再进行安装,回滚的办法也在readme里边。
--opatch auto /softtmp/psu5 -rollback -ocmrf /softtmp/ocm_11gR2_psu5_lhr.rsp
$ORACLE_HOME/OPatch/opatch rollback -local -id 13348650 -oh /oracle/app/oracle/product/11.2.0/db
$ORACLE_HOME/OPatch/opatch rollback -local -id 13004894 -oh /oracle/app/oracle/product/11.2.0/db
--@$ORACLE_HOME/rdbms/admin/catbundle_PSU__ROLLBACK.sql
---------------------------------------------------------------------------------------------------------------------
oracle 每个季度都会发布最新的补丁。对于生产运维人员来说,定期升级系统、打补丁是日常工作中不可缺少的部分。
相对于过去的版本,Oracle打补丁的方式已经变得比较简单,处理PSU的方法也发生了一些变化。在11g中,对于一些小bug的修复,我们可以使用OPatch工具进行补丁修复。对于大的版本升级,Oracle的PSU实际上就是一系列全新的安装文件,从MOS上下载之后就可以直接进行安装。
1、关闭数据库
Oracle的PSU升级不更新数据字典,风险较小,但是还是需要停库进行升级操作。
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
停止监听服务。
[oracle@bntjftest 20299015]$ lsnrctl stop
检查服务进程
[oracle@bntjftest 20299015]$ ps aux | grep ora_
oracle 6922 0.0 0.0 5700 796 pts/3 S+ 17:48 0:00 grep ora_
[oracle@bntjftest 20299015]$ ps aux | grep tns
oracle 6924 0.0 0.0 5704 796 pts/3 S+ 17:48 0:00 grep tns
2、检查opatch版本信息,需要的话进行升级
[oracle@bntjftest OPatch]$ ./opatch version
OPatch Version: 11.2.0.1.7
OPatch succeeded.
检查发现opatch版本较低,为默认版本,所以需要升级opatch。升级方法很简单,直接mv掉原来的opatch目录,然后解压最新版本的opatch软件到ORACLE_HOME下面即可
[oracle@bntjftest OPatch]$ unzip p6880880_112000_Linux-x86-64-opatch .zip -d $ORACLE_HOME
再次检查版本,发现已经升级成功。
[oracle@bntjftest OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
3、应用PSU补丁
1)插曲一、安装程序错误
[oracle@bntjftest OPatch]$ ./opatch apply ./20299015/
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
The details are:
Patch ( 20299015 ) is not applicable>UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
OPatch failed with error code 73
不使用自动模式,手工运行,一样报错:
[oracle@bntjftest 20299015]$ /app/oracle/product/11.2.0/dbhome_1/OPatch/opatch napply -skip_subset -skip_duplicate
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
The details are:
Patch ( 20299015 ) is not applicable>UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
OPatch failed with error code 73
上网baidu,“ UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed”, 很快就查到解决办法,明确了其实就是因为有用户进程占用了文件libclntsh.so.11
[oracle@bntjftest 20299015]$ /sbin/fuser /app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11 .1
/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: 16470m
[oracle@bntjftest 20299015]$ ps -ef | grep 16470
oracle 16470 5399 0 14:45 pts/2 00:00:00 sqlplus as sysdba
oracle 7780 6617 0 18:47 pts/3 00:00:00 grep 16470
[oracle@bntjftest 20299015]$ kill -9 16470
[oracle@bntjftest 20299015]$ /sbin/fuser /app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
3)再次重新应用PSU补丁,成功
[oracle@bntjftest 20299015]$ /app/oracle/product/11.2.0/dbhome_1/OPatch/opatch napply -skip_subset -skip_duplicate
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: [17811429 17811438 17811447 18203835 18203837 18203838 19463893 19544839 19584068 19972564 19972566 19972568 19972569 20142975 20299015 20506699 20506715 20631274]
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
OPatch Session completed with warnings.
Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
OPatch completed with warnings.
4、检查应用之后的结果
[oracle@bntjftest 20299015]$ ../opatch lspatches
20631274;
20506715;
20506699;
20299015;
20142975;
19972569;
19972568;
19972566;
19972564;
19584068;
19544839;
19463893;
18203838;
18203837;
18203835;
17811447;
17811438;
17811429;
[oracle@bntjftest 20299015]$ ../opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_11-04-15AM_1.log
Lsinventory Output file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2015-05-14_11-04-15AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (18) :
Patch 20631274 : applied on Wed May 13 17:11:06 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 10:25:35 hrs PST8PDT
Bugs fixed:
20296213, 17600719, 19458377, 19554106, 20631274, 16524926, 19466309
Patch 20506715 : applied on Wed May 13 17:11:02 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 10:23:10 hrs PST8PDT
Bugs fixed:
19049453, 19915271, 16450169, 17006570, 17811456, 18554871, 17786278
18096714, 18744139, 20506715, 18061914
Patch 20506699 : applied on Wed May 13 17:10:57 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 11:23:48 hrs PST8PDT
Bugs fixed:
20506699, 19358317, 19197175, 19972570, 17762296
Patch 20299015 : applied on Wed May 13 17:10:54 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 10:28:05 hrs PST8PDT
Bugs fixed:
20299015, 18139690, 18681862, 17343514, 19727057, 19271443, 19854503, 17551709
Patch 20142975 : applied on Wed May 13 17:10:53 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:47:05 hrs PST8PDT
Bugs fixed:
19827973, 19463897, 19289642, 20142975
Patch 19972569 : applied on Wed May 13 17:10:51 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:21:09 hrs PST8PDT
Bugs fixed:
19972569, 19006849
Patch 19972568 : applied on Wed May 13 17:10:50 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:13:36 hrs PST8PDT
Bugs fixed:
19972568, 19309466
Patch 19972566 : applied on Wed May 13 17:10:48 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:03:20 hrs PST8PDT
Bugs fixed:
19972566, 18641461, 18641451
Patch 19972564 : applied on Wed May 13 17:10:45 CST 2015
Unique Patch ID: 18406185
Created on 21 Dec 2014, 23:54:58 hrs PST8PDT
Bugs fixed:
19972564, 18436647
Patch 19584068 : applied on Wed May 13 17:10:43 CST 2015
Unique Patch ID: 18084194
Created on 24 Sep 2014, 07:43:52 hrs PST8PDT
Bugs fixed:
18262334, 19584068
Patch 19544839 : applied on Wed May 13 17:10:40 CST 2015
Unique Patch ID: 18084194
Created on 11 Oct 2014, 01:43:34 hrs PST8PDT
Bugs fixed:
18673325, 19544839, 19211724, 18673304
Patch 19463893 : applied on Wed May 13 17:10:26 CST 2015
Unique Patch ID: 18084194
Created on 24 Sep 2014, 06:28:06 hrs PST8PDT
Bugs fixed:
19463893, 18641419
Patch 18203838 : applied on Wed May 13 17:10:24 CST 2015
Unique Patch ID: 17351342
Created on 26 Feb 2014, 23:57:58 hrs PST8PDT
Bugs fixed:
17865671, 18203838
Patch 18203837 : applied on Wed May 13 17:10:21 CST 2015
Unique Patch ID: 17351342
Created on 26 Feb 2014, 23:48:38 hrs PST8PDT
Bugs fixed:
17716305, 18203837
Patch 18203835 : applied on Wed May 13 17:10:19 CST 2015
Unique Patch ID: 17351342
Created on 26 Feb 2014, 23:43:04 hrs PST8PDT
Bugs fixed:
17721717, 18203835
Patch 17811447 : applied on Wed May 13 17:10:17 CST 2015
Unique Patch ID: 17066906
Created on 11 Dec 2013, 02:20:51 hrs PST8PDT
Bugs fixed:
17811447, 17088068
Patch 17811438 : applied on Wed May 13 17:10:15 CST 2015
Unique Patch ID: 17066906
Created on 11 Dec 2013, 02:37:11 hrs PST8PDT
Bugs fixed:
17811438, 16721594
Patch 17811429 : applied on Wed May 13 17:10:13 CST 2015
Unique Patch ID: 17066906
Created on 11 Dec 2013, 02:36:54 hrs PST8PDT
Bugs fixed:
17811429, 13944971
--------------------------------------------------------------------------------
OPatch succeeded.
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPAC VERSION ID BUNDL COMMENTS
------------------------------ -------- -------- ---------- ---------- ----- --------------------
05-MAY-15 09.24.08.184589 AM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
13-MAY-15 05.17.48.578053 PM APPLY SERVER 11.2.0.4 6 CPU CPUApr2015
2 rows selected.
【PSU】记Oracle一次高危漏洞补丁修复过程
记Oracle一次高危漏洞补丁修复过程
一、概述
本次技术讨论暂不评价微博好坏,不过本人得知这次BUG确实来源于微博,截图如下:
由上图可知,在版本11.2.0.4中用户无update权限,可以通过with as绕过执行DML操作。经过几个版本测试,发现11.2.0.1/12.1.0也有这样的问题,10g无此问题。
二、 解决过程
版本说明:rhel6.3_x64 Oracle11.2.0.4_x64
当以为这是一个Oracle新版本中的新BUG时,恩墨发表了一篇《【云和恩墨】Oracle数据库高危漏洞警告》,借此参考,我从官网下载PSU补丁,安装并测试,安装完成后此高危漏洞得到修复。
首先,再次测试一下,该版本下执行update语句。
[oracle@ora11 soft]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu May 14 08:57:43 2015
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
SQL> create user test identified by test; User created. SQL> grant create session,connect to test; Grant succeeded. SQL> grant select on scott.emp to test; Grant succeeded. SQL> conn test/test Connected. SQL> select * from scott.emp; ------ ---------- --------- ------- ------------------- ---------- ----- ------- 7369 SMITH CLERK 7902 1980-12-17 00:00:00 800 20 7499 ALLEN SALESMAN 7698 1981-02-20 00:00:00 1600 300 30 7521 WARD SALESMAN 7698 1981-02-22 00:00:00 1250 500 30 7566 JONES MANAGER 7839 1981-04-02 00:00:00 2975 20 7654 MARTIN SALESMAN 7698 1981-09-28 00:00:00 1250 1400 30 7698 BLAKE MANAGER 7839 1981-05-01 00:00:00 2850 30 7782 CLARK MANAGER 7839 1981-06-09 00:00:00 2450 10 7788 SCOTT ANALYST 7566 1987-04-19 00:00:00 3000 20 7839 KING PRESIDENT 1981-11-17 00:00:00 5000 10 7844 TURNER SALESMAN 7698 1981-09-08 00:00:00 1500 0 30 7876 ADAMS CLERK 7788 1987-05-23 00:00:00 1100 20 7900 JAMES CLERK 7698 1981-12-03 00:00:00 950 30 7902 FORD ANALYST 7566 1981-12-03 00:00:00 3000 20 7934 MILLER CLERK 7782 1982-01-23 00:00:00 1300 10 update scott.emp set sal=1699 where ename='ALLEN' * ERROR at line 1: ORA-01031: insufficient privileges SQL> update (with temp as (select * from scott.emp) select * from temp) set sal=1699 where ename='ALLEN';
1 row updated. SQL> commit; Commit complete. |
确认该漏洞存在,下面我们开始为该版本数据库打最新PSU补丁。
根据这篇文章《Oracle Critical Patch Update Advisory - July 2014》,找到受影响的数据库及版本,顺便简单介绍一下怎么通过Oracle官网查找补丁。
点击Database,打开文档 ID 1666884.1,选择关于该版本相关补丁,当然我们可以选择最新补丁,在这里我根据其Table,选择了补丁Patch 18522509
由于该补丁非最新补丁,在你点击该补丁号打开后,Oracle会提醒你,此补丁程序已被取代。如下图所示,我们可以选择最新补丁,20299013点击下载。
|
下载完成后,讲补丁程序上传至需打补丁的数据库服务器,解压,阅读相关文件README.html。
其中有一先决条件
2.1 OPatch UtilityYou must use the OPatch utility version 11.2.0.3.6 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 11.2, which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release. For information about OPatch documentation, including any known issues, see My Oracle Support Document 293369.1 OPatch documentation list.
|
查看该数据库OPatch版本
[oracle@ora11 ocm]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0 Central Inventory : /oracle/app/oraInventory from : /oracle/app/oracle/product/11.2.0/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 |
此PSU补丁要求OPatch版本必须11.2.0.3.6以上,不信邪,那我们执行以下试试。
[oracle@ora11 20299013]$ opatch apply Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0 Central Inventory : /oracle/app/oraInventory from : /oracle/app/oracle/product/11.2.0/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /oracle/app/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2015-05-14_10-20-22AM_1.log
Verifying environment and performing prerequisite checks... Prerequisite check "CheckMinimumOPatchVersion" failed. The details are:
The OPatch being used has version 11.2.0.3.4 while the following patch(es) require higher versions: Patch 17478514 requires OPatch version 11.2.0.3.5. Patch 18031668 requires OPatch version 11.2.0.3.5. Patch 18522509 requires OPatch version 11.2.0.3.5. Patch 19121551 requires OPatch version 11.2.0.3.5. Patch 19769489 requires OPatch version 11.2.0.3.5. Patch 20299013 requires OPatch version 11.2.0.3.5. Please download latest OPatch from My Oracle Support.
UtilSession failed: Prerequisite check "CheckMinimumOPatchVersion" failed. Log file location: /oracle/app/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2015-05-14_10-20-22AM_1.log
OPatch failed with error code 73 [oracle@ora11 20299013]$ |
好了,我们根据补丁包中README.html,链接点击下载OPatch补丁(注意,选择好数据库版本、操作系统版本)patch 6880880。
上传给OPatch补丁,我们准备开始执行补丁安装。
备份原OPatch目录,解压新的OPatch目录,并拷贝。
[oracle@ora11 soft]$ unzip p6880880_112000_Linux-x86-64.zip Oracle Interim Patch Installer version 11.2.0.3.10 Copyright (c) 2015, Oracle Corporation. All rights reserved. Oracle Home : /oracle/app/oracle/product/11.2.0 Central Inventory : /oracle/app/oraInventory from : /oracle/app/oracle/product/11.2.0/oraInst.loc OPatch version : 11.2.0.3.10 OUI version : 11.2.0.4.0 |
下面执行PUS补丁程序
关于监听、数据库
shutdown immediate| lsnrctl stop |
解压PSU,进入目录,执行以下命令
unzip p20299013_112040_Linux-x86-64.zip cd 20299013 opatch apply |
执行完成后,启动数据库,执行SQL脚本,到此,PSU补丁打完。
cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> @catbundle.sql psu apply |
查看:
[oracle@ora11 admin]$ opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.10 Copyright (c) 2015, Oracle Corporation. All rights reserved. Oracle Home : /oracle/app/oracle/product/11.2.0 Central Inventory : /oracle/app/oraInventory from : /oracle/app/oracle/product/11.2.0/oraInst.loc OPatch version : 11.2.0.3.10 OUI version : 11.2.0.4.0 Log file location : /oracle/app/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2015-05-14_10-50-38AM_1.log
Lsinventory Output file location : /oracle/app/oracle/product/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2015-05-14_10-50-38AM.txt
-------------------------------------------------------------------------------- Local Machine Information:: Hostname: ora11 ARU platform id: 226 ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0 There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 20299013 : applied on Thu May 14 10:47:37 CST 2015 Unique Patch ID: 18573940 Patch description: "Database Patch Set Update : 11.2.0.4.6 (20299013)" Created on 4 Mar 2015, 02:27:44 hrs PST8PDT |
重新验证Oracle数据库高危漏洞,Oracle11.2.0.4版本已修复。
SQL> conn test/test Connected. SQL> update (with temp as (select * from scott.emp) select * from temp) set sal=1600 where ename='ALLEN'; update (with temp as (select * from scott.emp) select * from temp) set sal=1600 where ename='ALLEN' * ERROR at line 1: ORA-01031: insufficient privileges |
三、总结
当看到这个漏洞时,知道它的危险性,也觉得奇怪,谁没事会尝试使用这样的命令去更新,很佩服发现该漏洞的人员,以及在漏洞出现后恩墨及时更新说明(当然,也许只是我孤陋寡闻)。在本人目光有限的情况下,知道有一些公司以及数据库管理人员对Oracle发布的一些补丁并未及时更新,当然也有各种缘由。数据库存储数据,它的重要性不言而喻,在我们认真学习技术的同时也应该多关注Oracle方面发布的相关公告、补丁程序等,善于利用Oracle网站、MOS,将会助你更好的学习、工作。还锻炼英语,不错的选择。
四、参考文档:
http://mp.weixin.qq.com/s?__biz=MjM5MzExMTU2OQ==&mid=205651373&idx=1&sn=4fcd886575af062c3c5814e73541cb26&scene=5#rd
【云和恩墨】Oracle数据库高危漏洞警告!
About Me
...............................................................................................................................
● 本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用
● 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新
● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-2101673/
● 本文博客园地址:http://www.cnblogs.com/lhrbest
● 本文pdf版及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/
● 数据库笔试面试题库及解答:http://blog.itpub.net/26736162/viewspace-2134706/
● QQ群:230161599 微信群:私聊
● 联系我请加QQ好友(646634621),注明添加缘由
● 于 2016-04-06 10:00~ 2016-04-11 19:00 在魔都完成
● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解
● 版权所有,欢迎分享本文,转载请保留出处
...............................................................................................................................
拿起手机使用微信客户端扫描下边的左边图片来关注小麦苗的微信公众号:xiaomaimiaolhr,扫描右边的二维码加入小麦苗的QQ群,学习最实用的数据库技术。