【PSU】AIX Oracle 11g RAC自动打GI PSU5补丁(11.2.0.3.5)--PSU升级详细过程
相关MOS文档地址:http://blog.itpub.net/26736162/viewspace-2096650/
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~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皆可,您的批评指正是我写作的最大动力。
【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/
工作中一直没碰到过打PSU的问题,最近系统要求安装的库必须和生产库一致,必须打PSU,那么就顺便学习了一下PSU的安装,记下来分享给大家。
每个数据库版本都有自己的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数据库提供两种方式的补丁一种是主动的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成了更大的超集,下面来整理一份数据库相关的补丁术语及注意事项。
从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
从12.1.0.1开始数据库提供安全相关的修复不再单独以SPU的形式发布,而是以PSU或DBBP打包的方式集中修复,这种方式也更为简单,PSU从2009年起就是ORACLE主动修改首选,也许会从2016年后DBBP会成为首选(linux/unit)。更多信息关注1581950.1
从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 的修复列表。
|
首先,我们针对所使用的数据库可能会进行如下措施,版本升级或补丁包升级,那何为版本升级、何为补丁包升级呢?
比如我的当前数据库是10GR2版本,但公司最近有个升级计划,把这套数据库升级到当下最新的11GR2,这种大版本间升级动作即为Upgrade。根据公司计划在原厂工程师和DBA共同努力下,数据库已升级到11GR2,当下版本为11.2.0.3.0。这时候原厂工程师推荐把最新的PSU给打上,获得老板的批准之后,我们又把数据库进行补丁包的升级,应用了PSU Patch14727310之后,数据库版本现在成为11.2.0.3.5,这个过程即是Update。
不得不再次提醒,Upgrade和Update都希望在获得原厂的支持下进行,尤其是Upgrade,这对于企业来说是个非常大的动作!
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
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.
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.
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.
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.
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.
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.
每个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中都有详细描述。
数据库版本 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;
项目 |
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 |
注:标红的选项是必填,且需要特别关注的项目 |
我们需要准备的软件如下表格所示,至于这些内容怎么来的我们不要急,且看下边的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。
首先我们登录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
打开相应的连接后,需选择我们需要的平台:
接下来下载即可。
首先利用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>
说明:分别在两个节点更新GRID_HOME和ORACLE_HOME的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>
[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>
[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.
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>
说明:一定要按照顺序一个节点一个节点的打,会同时升级当前节点的GRID和DB SOFTWARE。
首先升级节点一:
[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>
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