【PSU】AIX 11g RAC自动打GI PSU5
作者:互联网
【PSU】AIX Oracle 11g RAC自动打GI PSU5补丁(11.2.0.3.5)
一.1 BLOG文档结构图
一.2 前言部分
一.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皆可,您的批评指正是我写作的最大动力。
一.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/
一.2.3 本文简介
工作中一直没碰到过打PSU的问题,最近系统要求安装的库必须和生产库一致,必须打PSU,那么就顺便学习了一下PSU的安装,记下来分享给大家。
一.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: |
一.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,这对于企业来说是个非常大的动作!
一.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
一.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.
一.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.
一.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.
一.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.
一.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.
一.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.
一.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中都有详细描述。
一.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升级正文部分
二.1 准备工作
二.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 |
注:标红的选项是必填,且需要特别关注的项目 |
二.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。
二.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 上传软件到/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>
二.3 更新2个节点的OPatch版本,必须要更新
说明:分别在两个节点更新GRID_HOME和ORACLE_HOME的OPatch版本。
二.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>
二.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>
二.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.
二.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>
二.5 开始升级GI PSU软件包
说明:一定要按照顺序一个节点一个节点的打,会同时升级当前节点的GRID和DB SOFTWARE。
二.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>
二.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升级了。
二.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>
二.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.
二.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]:/>
二.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>
二.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_<database SID PREFIX>_ROLLBACK.sql
标签:11g,RAC,0.3,11.2,ONLINE,oracle,PSU,app,PSU5 来源: https://blog.51cto.com/lhrbest/2696967