在升级rac 11.2.0.1到11.2.0.2 的时候会遇到一个bug 11201 TO 11202 ASM ROLLING UPGRADE – OLD CRS STACK FAILS TO STOP 本文以实例介绍如何安装次bug的补丁!
1 确定opatch 的版本 下载最新的optach版本和补丁程序
p6880880 可以参照 此文
Patch 9413827: 11201 TO 11202 ASM ROLLING UPGRADE – OLD CRS STACK FAILS TO STOP(patchid:9413827)
2 检查已经安装的patch 注意 oracle grid 用户的ORACLE_HOME GI_HOME 都要安装最新版本的opatch
grid@rac1:/tmp/9413827>opatch version
OPatch Version: 11.2.0.3.0
OPatch succeeded.
3 以oracle 用户在本地停止RDBMS DB HOME 的相关资源
语法
$ORACLE_HOME/bin/srvctl -o [RDBMS_HOME] -s [status file location] -n [node_name]
实际例子:
oracle@rac1:/home/oracle>srvctl stop home -o $ORACLE_HOME -n rac1 -s stop_db_res
oracle@rac1:/home/oracle>srvctl status database -d rac
实例 rac1 没有在 rac1 节点上运行
实例 rac2 正在节点 rac2 上运行
oracle@rac1:/home/oracle>cat stop_db_res
db-rac
4. 切换到root用户执行rootcrs.pl -unlock 命令
[root@rac1 ~]# /opt/rac/11.2.0/grid/crs/install/rootcrs.pl -unlock
2012-07-08 20:28:46: Parsing the host name
2012-07-08 20:28:46: Checking for super user privileges
2012-07-08 20:28:46: User has super user privileges
Using configuration parameter file: /opt/rac/11.2.0/grid/crs/install/crsconfig_params
CRS-2791: 正在启动用于关闭 'rac1' 上 Oracle High Availability Services 管理的资源的操作
CRS-2673: 尝试停止 'ora.crsd' (在 'rac1' 上)
CRS-2790: 正在启动关闭 'rac1' 上集群就绪服务管理的资源的操作
CRS-2673: 尝试停止 'ora.LISTENER.lsnr' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.DATA1.dg' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.DATA2.dg' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.LISTENER_SCAN1.lsnr' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.LISTENER_SCAN1.lsnr' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.scan1.vip' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.scan1.vip' (在 'rac1' 上)
CRS-2672: 尝试启动 'ora.scan1.vip' (在 'rac2' 上)
CRS-2677: 成功停止 'ora.LISTENER.lsnr' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.rac1.vip' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.rac1.vip' (在 'rac1' 上)
CRS-2672: 尝试启动 'ora.rac1.vip' (在 'rac2' 上)
CRS-2676: 成功启动 'ora.rac1.vip' (在 'rac2' 上)
CRS-2676: 成功启动 'ora.scan1.vip' (在 'rac2' 上)
CRS-2672: 尝试启动 'ora.LISTENER_SCAN1.lsnr' (在 'rac2' 上)
CRS-2676: 成功启动 'ora.LISTENER_SCAN1.lsnr' (在 'rac2' 上)
CRS-2677: 成功停止 'ora.DATA1.dg' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.DATA2.dg' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.asm' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.asm' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.ons' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.eons' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.ons' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.net1.network' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.net1.network' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.eons' (在 'rac1' 上)
CRS-2792: 关闭 'rac1' 上集群就绪服务管理的资源的操作已完成
CRS-2677: 成功停止 'ora.crsd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.cssdmonitor' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.ctssd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.evmd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.asm' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.mdnsd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.cssdmonitor' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.mdnsd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.evmd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.ctssd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.asm' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.cssd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.cssd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.gpnpd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.diskmon' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.gpnpd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.gipcd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.gipcd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.diskmon' (在 'rac1' 上)
CRS-2793: 关闭 'rac1' 上 Oracle High Availability Services 管理的资源的操作已完成
CRS-4133: Oracle High Availability Services has been stopped.
Successfully unlock /opt/rac/11.2.0/grid
[root@rac1 ~]#
5 以oracle 用户执行 Patch 下的prepatch.sh脚本 注意路径!
oracle@rac1:/tmp/9413827/custom/scripts>sh prepatch.sh -dbhome $ORACLE_HOME
prepatch.sh completed successfully.
6 正式安装补丁
6.1以grid用户来安装补丁程序
grid@rac1:/tmp/9413827>opatch napply -local -oh $ORACLE_HOME -id 9413827
Oracle 中间补丁程序安装程序版本 11.2.0.3.0
版权所有 (c) 2012, Oracle Corporation。保留所有权利。
Oracle Home : /opt/rac/11.2.0/grid
Central Inventory : /opt/rac/oraInventory
from : /opt/rac/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.1.0
Log file location : /opt/rac/11.2.0/grid/cfgtoollogs/opatch/opatch2012-07-08_20-36-57下午_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 9413827
是否继续? [y|n]
y
User Responded with: Y
All checks passed.
提供电子邮件地址以用于接收有关安全问题的通知, 安装 Oracle Configuration Manager 并启动它。如果您使用 My Oracle
Support 电子邮件地址/用户名, 操作将更简单。
有关详细信息, 请访问 http://www.oracle.com/support/policies.html。
电子邮件地址/用户名:
尚未提供电子邮件地址以接收有关安全问题的通知。
是否不希望收到有关安全问题 (是 [Y], 否 [N]) [N] 的通知: Y
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = '/opt/rac/11.2.0/grid')
本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '9413827' to OH '/opt/rac/11.2.0/grid'
正在为组件 oracle.crs, 11.2.0.1.0 打补丁...
Verifying the update...
Patch 9413827 successfully applied.
Log file location: /opt/rac/11.2.0/grid/cfgtoollogs/opatch/opatch2012-07-08_20-36-57下午_1.log
OPatch succeeded.
grid@rac1:/tmp/9413827>
6.2 以oracle用户执行如下命令
进入补丁解压的目录
cd /tmp/9413827/
执行命令注意语法:
% opatch napply custom/server/ -local -oh -id 9413827 具体命令:
oracle@rac1:/tmp/9413827>opatch napply custom/server/ -local -oh $ORACLE_HOME -id 9413827
Oracle 中间补丁程序安装程序版本 11.2.0.3.0
版权所有 (c) 2012, Oracle Corporation。保留所有权利。
Oracle Home : /opt/rac/oracle/11.2.0/rac
Central Inventory : /opt/rac/oraInventory
from : /opt/rac/oracle/11.2.0/rac/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.1.0
Log file location : /opt/rac/oracle/11.2.0/rac/cfgtoollogs/opatch/opatch2012-07-08_20-43-50下午_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 9413827
是否继续? [y|n]
y
User Responded with: Y
All checks passed.
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = '/opt/rac/oracle/11.2.0/rac')
本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '9413827' to OH '/opt/rac/oracle/11.2.0/rac'
正在为组件 oracle.rdbms, 11.2.0.1.0 打补丁...
Verifying the update...
Patch 9413827 successfully applied.
Log file location: /opt/rac/oracle/11.2.0/rac/cfgtoollogs/opatch/opatch2012-07-08_20-43-50下午_1.log
OPatch succeeded.
7. 配置HOME目录
以root用户执行以下命令
chmod +w $CRS_HOME/log/[nodename]/agent
chmod +w $CRS_HOME/log/[nodename]/agent/crsd
[root@rac1 ~]# chmod +w /opt/rac/11.2.0/grid/log/rac1/agent/
[root@rac1 ~]# chmod +w /opt/rac/11.2.0/grid/log/rac1/agent/crsd/
以DB/RDBMS拥有者用户执行以下命令
su - oracle
cd /tmp/9413827/
oracle@rac1:/home/oracle>cd /tmp/9413827/custom/scripts/
oracle@rac1:/tmp/9413827/custom/scripts>
oracle@rac1:/tmp/9413827/custom/scripts>sh postpatch.sh -dbhome $ORACLE_HOME
Reading /opt/rac/oracle/11.2.0/rac/install/params.ora..
Reading /opt/rac/oracle/11.2.0/rac/install/params.ora..
Parsing file /opt/rac/oracle/11.2.0/rac/bin/racgwrap
Parsing file /opt/rac/oracle/11.2.0/rac/bin/srvctl
Parsing file /opt/rac/oracle/11.2.0/rac/bin/srvconfig
Parsing file /opt/rac/oracle/11.2.0/rac/bin/cluvfy
Verifying file /opt/rac/oracle/11.2.0/rac/bin/racgwrap
Verifying file /opt/rac/oracle/11.2.0/rac/bin/srvctl
Verifying file /opt/rac/oracle/11.2.0/rac/bin/srvconfig
Verifying file /opt/rac/oracle/11.2.0/rac/bin/cluvfy
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/racgwrap
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/srvctl
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/srvconfig
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/cluvfy
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/racgmain
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/racgeut
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/diskmon.bin
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/lsnodes
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/osdbagrp
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/rawutl
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/srvm/admin/ractrans
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/srvm/admin/getcrshome
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/gnsd
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/bin/crsdiag.pl
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libhasgen11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libclsra11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libdbcfg11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libocr11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libocrb11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libocrutl11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libuini11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/librdjni11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libgns11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libgnsjni11.so
Reapplying file permissions on /opt/rac/oracle/11.2.0/rac/lib/libagfw11.so
oracle@rac1:/tmp/9413827/custom/scripts>
8 以root 用户重启CRS进程
[root@rac1 ~]# /opt/rac/11.2.0/grid/crs/install/rootcrs.pl -patch
2012-07-08 20:48:08: Parsing the host name
2012-07-08 20:48:08: Checking for super user privileges
2012-07-08 20:48:08: User has super user privileges
Using configuration parameter file: /opt/rac/11.2.0/grid/crs/install/crsconfig_params
ADVM/ACFS is not supported on centos-release-5-3.el5.centos.1
CRS-4123: Oracle High Availability Services has been started.
[root@rac1 ~]# su - oracle
oracle@rac1:/home/oracle>srvctl start home -o $ORACLE_HOME -n rac1 -s stop_db_res
oracle@rac1:/home/oracle>
9 分别以oracle grid用户验证安装是否成功!
grid@rac1:/tmp/9413827>opatch lsinventory -detail -oh $ORACLE_HOME
oracle@rac1:/home/oracle>opatch lsinventory -detail -oh $ORACLE_HOME
10. 在其他节点上重复以上步骤,直到在所有节点上成功安装该补丁!