之前总结过《Oracle 11.2.0.4 RAC安装最新PSU补丁》,

这次整理为简明版,忽略一切输出的显示,引入一些官方的说明,增加OJVM PSU的补丁应用。

环境:RHEL6.5 + Oracle 11.2.0.4 RAC(4 nodes)

本次需求:应用最新的PSU,OJVM PSU补丁。

目前最新发布(2016-07-19)的PSU,OJVM PSU补丁文件分别为:

p23274134_112040_Linux-x86-64.zip

p23177551_112040_Linux-x86-64.zip

1.检查OPatch版本

需要跟踪对应补丁的README说明,确定当前环境的OPatch版本符合要求,如果不符合要求,需要下载符合要求的OPatch版本。

1.1 查询OPatch版本

$ORACLE_HOME/OPatch/opatch version

1.2 替换为新版本OPatch

备份原来的OPatch,解压/tmp下的新版本OPatch到$ORACLE_HOME下,检查OPatch的版本:

mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_bak && cd /tmp && unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch version

2.解压补丁文件

$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
解压补丁文件:赋权确定解压的目录/usr2有对应权限,然后解压补丁文件

root:
chown oracle:oinstall /usr2 && chmod 775 /usr2 && mv /tmp/p23274134_112040_Linux-x86-64.zip /usr2/
grid:
cd /usr2 && unzip p23274134_112040_Linux-x86-64.zip

3.确认已停止OEM

Stop EM Agent Processes Prior to Patching and Prior to Rolling Back the Patch

查看em运行状态:
$ORACLE_HOME/bin/emctl status dbconsole
如果状态是运行,则需要关闭:
$ORACLE_HOME/bin/emctl stop dbconsole

一般是在Oracle用户登录1节点 停止em。

4.本次PSU补丁说明

23054359
DB PSU 11.2.0.4.160719 (INCLUDES CPUJUL2016)
Both DB Homes and Grid Home 23054319
OCW PSU 11.2.0.4.160719
Both DB Homes and Grid Home 22502505
ACFS PSU 11.2.0.4.160419
Only Grid Home

5.手动应用补丁

Manual Steps for Apply/Rollback Patch
See My Oracle Support Document 1641136.1 for cases where opatch auto cannot be used.
文档第5部分
5 Manual Steps for Apply/Rollback Patch

5.1 停止CRS

--1.Stop the CRS managed resources running from DB homes. If this is a GI Home environment, as the database home owner execute:
`$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>` $ORACLE_HOME/bin/srvctl stop home -o $ORACLE_HOME -s /tmp/stophome.log -n xxx01

实际这一步没成功,也没看出对应用补丁什么影响.

5.2 运行rootcrs.pl

--2.Run the pre root script. If this is a GI Home, as the root user execute:
`# <GI_HOME>/crs/install/rootcrs.pl -unlock` 停止节点1的服务
su - root
$GRID_HOME/crs/install/rootcrs.pl -unlock

5.3 应用CRS补丁

--3.Apply the CRS patch using. As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFS Components_number>
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>

grid用户登录,打对应补丁:

su - grid
$GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /usr2/23274134/23054319
$GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /usr2/23274134/22502505
$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /usr2/23274134/23054359

5.4 补丁安装前执行脚本

--4.Run the pre script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>

Oracle用户登录,补丁安装前检查:

su - oracle
$ /usr2/23274134/23054319/custom/server/23054319/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME

5.5 应用DB补丁

--5.Apply the DB patch. As the database home owner execute:
$ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>
$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>

oracle用户登录,打对应补丁:

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /usr2/23274134/23054319/custom/server/23054319
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /usr2/23274134/23054359

5.6 补丁安装后执行脚本

--6.Run the post script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>

oracle用户登录,补丁修复完确定:

$ /usr2/23274134/23054319/custom/server/23054319/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME

5.7 root用户执行脚本

--7.Run the post script. As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -patch
If this is an Oracle Restart Home, as the root user execute:
# <GI_HOME>/crs/install/roothas.pl -patch

root用户登录,执行脚本:

su - root
# $GRID_HOME/rdbms/install/rootadd_rdbms.sh
# $GRID_HOME/crs/install/rootcrs.pl -patch

5.8 可能的报错

--8.If the message, "A system reboot is recommended before using ACFS??? is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.

5.9 呼应5.1步骤,这里也没做

--9.Start the CRS managed resources that were earlier running from DB homes. If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
If this is an Oracle Restart Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location>

6.数据库应用PSU

6.1 关闭数据库然后应用PSU

srvctl stop database -d lrnop

6.2 根据下面文档的内容操作

2.5.2 Loading Modified SQL Files into the Database

The following steps load modified SQL files into the database. For an Oracle RAC environment, perform these steps on only one node.

For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU. For information about the catbundle.sql script, see My Oracle Support Document 605795.1 Introduction to Oracle Database catbundle.sql. If the OJVM PSU was applied for a previous GI PSU patch, you may see invalid Java classes after execution of the catbundle.sql script in the previous step. If this is the case, run utlrp.sql to re-validate these Java classes. cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
Check the following log files in $ORACLE_BASE/cfgtoollogs/catbundle for any errors: catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, see Section 3, "Known Issues". This patch now includes the OJVM Mitigation patch (Patch:19721304). If an OJVM PSU is installed or planned to be installed, no further actions are necessary. Otherwise, the workaround of using the OJVM Mitigation patch can be activated. As SYSDBA do the following from the admin directory: SQL > @dbmsjdev.sql
SQL > exec dbms_java_dev.disable
For more information on the OJVM mitigation patch, see Document 1929745.1 Oracle Recommended Patches -- "Oracle JavaVM Component Database PSU" (OJVM PSU) Patches. 2.5.3 Upgrade Oracle Recovery Manager Catalog If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it: $ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;

7.应用OJVM PSU

7.1 打OJVM PSU

p23177551_112040_Linux-x86-64.zip

7.2 应用OJVM PSU

su - oracle
cp /tmp/p23177551_112040_Linux-x86-64.zip /usr2 && cd /usr2 && unzip p23177551_112040_Linux-x86-64.zip $ cd <PATCH_TOP_DIR>/23177551
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./ cd /usr2/23177551 && opatch apply

7.3 数据库应用OJVM PSU

--1.For an Oracle RAC environment, reload the packages on one of the nodes using the following commands. Make sure no other instance of the database is up on the remote nodes.

cd $ORACLE_HOME/sqlpatch/23177551
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> alter system set cluster_database=false scope=spfile;
SQL> SHUTDOWN
SQL> STARTUP UPGRADE
SQL> @postinstall.sql
SQL> alter system set cluster_database=true scope=spfile;
SQL> SHUTDOWN
SQL> STARTUP
--2.After installing the SQL portion of the patch, some packages could become INVALID. This will get recompiled upon access or you can run utlrp.sql to get them back into a VALID state. cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

8.应用补丁结果

最终验证应用补丁的结果:
各节点的$GRID_HOME,$ORACLE_HOME,都可以使用opatch lspatches查看补丁应用的情况:

[root@db02 tmp]# su - grid
[grid@db02 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
23054359;Database Patch Set Update : 11.2.0.4.160719 (23054359)
22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319) OPatch succeeded.
[grid@db02 ~]$ exit
logout
[root@db02 tmp]# su - oracle
[oracle@lrnopdb02 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
23177551;OJVM PATCH SET UPDATE 11.2.0.4.160719
23054359;Database Patch Set Update : 11.2.0.4.160719 (23054359)
23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319) OPatch succeeded.
[oracle@db02 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 18 17:39:41 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options SQL> set linesize 1000
SQL> select * from dba_registry_history; ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
28-JUN-16 12.36.13.876461 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
18-AUG-16 03.49.29.881506 PM APPLY SERVER 11.2.0.4 160719 PSU PSU 11.2.0.4.160719
18-AUG-16 05.20.06.098533 PM jvmpsu.sql SERVER 11.2.0.4.160719OJVMPSU 0 RAN jvmpsu.sql
18-AUG-16 05.20.06.213324 PM APPLY SERVER 11.2.0.4.160719OJVMPSU 0 OJVM PSU post-install
18-AUG-16 05.20.06.245501 PM APPLY 23177551 Patch 23177551 applied 6 rows selected. SQL> select count(1) from gv$instance; COUNT(1)
----------
4 SQL>

至此,Oracle 11g RAC 应用补丁简明版整个过程的示例完毕。

Oracle 11g RAC 应用补丁简明版的更多相关文章

  1. Oracle 11g RAC 自动应用PSU补丁简明版

    环境:Oracle RAC(GI 11.2.0.4 + DB 11.2.0.4) 本文应用补丁信息: Patch 23615403 - Combo of OJVM Component 11.2.0.4 ...

  2. Oracle 11g RAC运维总结

    转至:https://blog.csdn.net/qq_41944882/article/details/103560879 1 术语解释1.1 高可用(HA)什么是高可用?顾名思义我们能轻松地理解是 ...

  3. 【Oracle 集群】Oracle 11G RAC教程之集群安装(七)

    Oracle 11G RAC集群安装(七) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总. ...

  4. Oracle 11g RAC停止和启动步骤

    关闭前备份控制文件/参数文件:   sqlplus / as sysdba alter database backup controlfile to '/home/oracle/control.ctl ...

  5. oracle 11g RAC安装节点二执行结果错误CRS-5005: IP Address: 192.168.1.24 is already in use in the network

    [root@testdb11b ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInvento ...

  6. Oracle 11g RAC环境下Private IP修改方法及异常处理

    Oracle 11g RAC环境下Private IP修改方法及异常处理 Oracle 11g RAC环境下Private IP修改方法及异常处理 一. 修改方法 1. 确认所有节点CRS服务以启动 ...

  7. Oracle 11g RAC 第二节点root.sh执行失败后再次执行root.sh

    Oracle 11g RAC 第二节点root.sh执行失败后再次执行root.sh前,要先清除之前的crs配置信息 # /u01/app/11.2.0/grid/crs/install/rootcr ...

  8. 安装Oracle 11g RAC R2 之Linux DNS 配置

    Oracle 11g RAC 集群中引入了SCAN(Single Client Access Name)的概念,也就是指集群的单客户端访问名称.SCAN 这个特性为客户端提供了单一的主机名,用于访问集 ...

  9. Oracle 11g RAC oc4j/gsd Offline

    Oracle 11g RAC中,发现oc4j以及gsd服务都处于offline状态,这是Oracle 11g RAC默认情形.即便如此,并不影响数据库的使用,因为 oc4j 是用于WLM 的一个资源, ...

随机推荐

  1. js学习笔记:webpack基础入门(一)

    之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...

  2. CMS模板应用调研问卷

    截止目前,已经有数十家网站与我们合作,进行了MIP化改造,在搜索结果页也能看到"闪电标"的出现.除了改造方面的问题,MIP项目组被问到最多的就是:我用了wordpress,我用了织 ...

  3. 深入理解C#

    简单认识.NET框架    (1)首先我们得知道 .NET框架具有两个主要组件:公共语言进行时CLR(Common Language Runtime)和框架类库FCL(Framework Class ...

  4. NET Core-TagHelper实现分页标签

    这里将要和大家分享的是学习总结使用TagHelper实现分页标签,之前分享过一篇使用HtmlHelper扩展了一个分页写法地址可以点击这里http://www.cnblogs.com/wangrudo ...

  5. 数据的双向绑定 Angular JS

    接触AngularJS许了,时常问自己一些问题,如果是我实现它,会在哪些方面选择跟它相同的道路,哪些方面不同.为此,记录了一些思考,给自己回顾,也供他人参考. 初步大致有以下几个方面: 数据双向绑定 ...

  6. 基于Composer Player 模型加载和相关属性设置

    主要是基于达索软件Composer Player.的基础上做些二次开发. public class ComposerToolBarSetting { public bool AntiAliasingO ...

  7. BPM配置故事之案例3-参与者与数据自动加载

    这才过了两天,阿海又来了. 阿海:公司决定改进管理方式,以后物资申请的申请人和申请部门要写具体使用人的名字和部门了. 小明:不是要让我改回去吧? 阿海:那太麻烦了,你能不能把申请人改成选择,选好人自动 ...

  8. Android 在Android代码中执行命令行

    1.路径最好不要是自己拼写的路径/mnt/shell/emulated/0/wifidog.conf 最好是通过方法获取的路径,不然可能导致命令无效  (挂载点的原因) public static f ...

  9. jQuery 的选择器常用的元素查找方法

    jQuery 的选择器常用的元素查找方法 基本选择器: $("#myELement")    选择id值等于myElement的元素,id值不能重复在文档中只能有一个id值是myE ...

  10. 烂泥:VMWare Workation双网卡配置IP地址

    本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前几天给一个客户做远程项目实施,客户那边的服务器是Windows OS的,我们这边的业务 ...