Oracle 11g RAC自动打GI PSU补丁(11.2.0.4.8)

一、准备工作 1,数据库环境

操作系统版本  : RedHat 6.5 x64  
数据库版本    : Oracle 11.2.0.4 x64 RAC    
Grid          : 11.2.0.4    
Oracle database: 11.2.0.4

2,准备内容

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

2. grid目录OPatch替换

(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.

3. oracle目录OPatch替换

(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和节点2分别生成ocm.rsp文件。

# su - oracle

$ cd  /u01/software  
$ /u01/app/oracle/product/11.2.0/db_1/OPatch/ocm/bin/emocmrsp    
$ ls

ocm.rsp

四、开始升级GI PSU软件包

说明:一定要按照顺序一个一个节点的打。

1. grid用户下解决GI PSU补丁包

(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

2. 测试兼容性

su - grid

$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

过程略过…

3、开始升级GRID root用户依次节点1,节点2上执行。

# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/software/21523375 -oh /u01/app/11.2.0/grid/ -ocmrf /u01/software/ocm.rsp

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/software -patchn 21523375 -oh /u01/app/11.2.0/grid/ -ocmrf /u01/software/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2015-12-25_10-09-05.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:  
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2015-12-25_10-09-05.report.log

2015-12-25 10:09:05: Starting Clusterware Patch Setup  
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...  
Stopped CRS successfully

patch /u01/software/21523375/21352635  apply successful for home  /u01/app/11.2.0/grid    
patch /u01/software/21523375/21352649  apply successful for home  /u01/app/11.2.0/grid    
patch /u01/software/21523375/21352642  apply successful for home  /u01/app/11.2.0/grid

Starting CRS...  
Installing Trace File Analyzer    
CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

4. 检查升级情况

# su - grid

$ /u01/app/11.2.0/grid/OPatch/opatch lsinv   
                                                   
Oracle Interim Patch Installer version 11.2.0.3.11    
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/3d97b4b2ce01a83162b398a40d1caeb2.html