一、准备工作 1,数据库环境
操作系统版本 : RedHat 6.5 x64
数据库版本 : Oracle 11.2.0.4 x64 RAC
Grid : 11.2.0.4
Oracle database: 11.2.0.4
GI PSU : p21523375_112040_Linux-x86-64.zip
OPatch : p6880880_112000_Linux-x86-64.zip
DB PSU : p21352635_112040_Linux-x86-64.zip 仅单实例使用。
OPatch下载地址:
https://updates.oracle.com/download/6880880.html
说明:GI PSU包括DB PSU,CPU。
二、更新OPatch版本,必须要更新说明:分别在两个节点更新OPatch版本。
1. 更新OPatch版本,需要更新到11.2.0.3.11,OPatch直接压缩替换就可以了。(1) 上传p6880880_112000_Linux-x86-64.zip到/u01/software目录下, /u01/software给777权限,也可以采用/tmp目录。
(2) root用户下将原OPatch目录改名。
mv /u01/app/11.2.0/grid/OPatch /u01/app/11.2.0/grid/OPatchbk
mv /u01/app/oracle/product/11.2.0/db_1/OPatch /u01/app/oracle/product/11.2.0/db_1/OPatchBK
(1) root用户
cd /u01/software/;chown grid:oinstall p6880880_112000_Linux-x86-64.zip
(2) grid用户
su - grid
cd /u01/software/
unzip p6880880_112000_Linux-x86-64.zip
(3) root用户
cd /u01/software/
mv OPatch /u01/app/11.2.0/grid/
(4) grid用户测试
su - grid
/u01/app/11.2.0/grid/OPatch/opatch version
OPatch Version: 11.2.0.3.11
OPatch succeeded.
(1) root用户
cd /u01/software/;chown oracle:oinstall p6880880_112000_Linux-x86-64.zip
(2) oracle用户
su - oracle
cd /u01/software/
unzip p6880880_112000_Linux-x86-64.zip
(3) root用户
cd /u01/software/
mv OPatch /u01/app/oracle/product/11.2.0/db_1/
(4) oracle用户测试
su - oracle
/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version
OPatch Version: 11.2.0.3.11
OPatch succeeded.
(1) root用户下打grid需要关闭grid(两节点都执行)
cd /u01/app/11.2.0/grid/bin
./crsctl stop has
(1) root用户操作
cd /u01/software/;chown grid:oinstall p21523375_112040_Linux-x86-64.zip
(2) grid用户操作
su - grid
cd /u01/software/;unzip p21523375_112040_Linux-x86-64.zip
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352649 -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352642 -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352635 -oh $ORACLE_HOME
----------------------------------------------------
执行示例如下:
Oracle Interim Patch Installer version 11.2.0.3.11
Copyright (c) 2015, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.11
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-12-18_16-21-46PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
四、开始升级GRID 1. 依次节点1,节点2上人执行。第1步: 执行脚本, 一定要执行,否则无法成功,确保CRS是关闭状态。
也可以先查看补丁包中的README文件。
[root@db1 bin]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock
Using configuration parameter file: /grid/grid_home/crs/install/crsconfig_params
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Successfully unlock /grid/grid_home
[root@db1 bin]#
第2步:下载补丁包(目前11.2.0.4.8 PSU),准备升级
su - grid
/u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352649
/u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352642
/u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352635
过程中按三个Y
2. 检查升级情况