11g打psu相比10g的手工操作步骤繁复很多,不过,也提供了用auto发方式简化操作步骤,最近刚好对一个rac打补丁,操作过程如下;
参考oracle support或者如下链接,可得到最新的psu情况
版本psu以及相关bundle-patch列表-(2013120-update.html
OracleDatabase PatchSet Update Database Grid Infrastructure Comments Includes Cpu
11.2.0.3.0 10404530 (包含在10404530中)
11.2.0.3.1 13343438 13348650 Bash 11.2.0.3.0 includes CPU Jan 2012
11.2.0.3.2 13696216 13696251 Bash 11.2.0.3.0 includes CPU Apr 2012
11.2.0.3.3 13923374 13919095 Bash 11.2.0.3.0 includes CPU Jul 2012
11.2.0.3.4 14275605 14275572 Bash 11.2.0.3.0 includes CPU Oct 2012
11.2.0.3.5 14727310 14727347 Bash 11.2.0.3.0 includes CPU Jan 2013
---------------------------------------------------------------------------------------------------------------------------
下载最新的GI PSU 11.2.0.3.5- 14727347
Oracle Grid Infrastructure Patch Set Update 11.2.0.3.5 (Includes Database PSU 11.2.0.3.5) - 14727347
这个补丁已经包括db patch(换言之,不用再单独下载和打db patch 14727310)
[root@dbrac5 ~]# cat /etc/oracle-release
Oracle Linux Server release 6.2
--检查opatch版本
需更新到11.2.0.3或更新版本,如不是需在oracle support下载
[root@dbrac5 orainst]# su - grid
[grid@dbrac5 ~]$ opatch version
OPatch Version: 11.2.0.3.0
OPatch succeeded.
[root@dbrac5 orainst]# su - oracle
[oracle@dbrac5 ~]$ opatch version
OPatch Version: 11.2.0.3.0
OPatch succeeded.
--建立 ocm.rsp 文件
用grid用户建立ocm.rsp
[grid@dbrac5 bin]$ ls
emocmrsp
[grid@dbrac5 bin]$ ./emocmrsp
OCM Installation Response Generator 10.3.4.0.0 - Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
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 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 (ocm.rsp) was successfully created.
[grid@dbrac5 bin]$ ls
emocmrsp ocm.rsp
[grid@dbrac6 orainst]$ cd /u01/app/11.2.0/grid/OPatch/ocm/bin/
[grid@dbrac6 bin]$ ls
emocmrsp ocm.rsp
[grid@dbrac6 bin]$ cp ocm.rsp /u01/orainst/psu
[grid@dbrac6 bin]$ cd /u01/orainst/psu
[grid@dbrac6 psu]$ ll
total 416440
-rw-r--r-- 1 grid oinstall 621 Jan 27 14:48 ocm.rsp
-rw-r--r-- 1 grid oinstall 25556377 Jan 27 14:42 p14727310_112030_Linux-x86-64.zip
-rw-r--r-- 1 grid oinstall 400870142 Jan 27 14:42 p14727347_112030_Linux-x86-64.zip
[grid@dbrac5 bin]$ scp ocm.rsp grid@dbrac6:/u01/app/11.2.0/grid/OPatch/ocm/bin/.
ocm.rsp
--检查当前补丁情况
[grid@dbrac5 OPatch]$ opatch lsinventory -detail -oh $GRID_HOME
[oracle@dbrac5 ~]$ opatch lsinventory -detail -oh $ORACLE_HOME
--停止数据库,看readme, 不是必要
[grid@dbrac5 ~]$ srvctl stop database -d qtdbrac
--停止dbconsole
[oracle@dbrac5 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/dbrac5_qtdbrac/sysman/log
[oracle@dbrac5 ~]$ emctl stop dbconsole
--解压psu文件
[grid@dbrac5 psu]$ unzip p14727347_112030_Linux-x86-64.zip -d 7347
[grid@dbrac5 psu]$ cd 7347
[grid@dbrac5 7347]$ ls
14727310 15876003 bundle.xml README.html README.txt
--检查新补丁是否存在冲突
[grid@dbrac5 7347]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/orainst/psu/7347
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, 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.0
OUI version : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-01-27_15-10-07PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
--在root用户执行,用auto方式打psu
[root@dbrac5 bin]# $GRID_HOME/OPatch/opatch auto /u01/orainst/psu/7347 -ocmrf /u01/orainst/psu/ocm.rsp
--root用户在节点2执行同样的命令。
[root@dbrac6 bin]# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/orainst/psu/7347 -ocmrf /u01/orainst/psu/ocm.rsp
Executing /usr/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch112.pl -patchdir /u01/orainst/psu -patchn 7347 -ocmrf /u01/orainst/psu/ocm.rsp -
paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2013-01-27_15-14-52.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
patch /u01/orainst/psu/7347/15876003/custom/server/15876003 apply successful for home /u01/app/oracle/product/11.2.0/dbhome_1
--启动db
srvctl start database -d qtdbrac
--执行脚本,并检查是否有错误
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle or $ORACLE_BASE/cfgtoollogs/catbundle for any errors:
catbundle_PSU__APPLY_.log
catbundle_PSU__GENERATE_.log
--检查升级情况
检查升级情况set line 200
col ACTION_TIME format a30
col action format a10
col version format a10
select * from dba_registry_history;
grid用户下执行
opatch lsinventory -detail -oh $GRID_HOME | grep -i patch
oracle用户下执行
opatch lsinventory -detail -oh $ORACLE_HOME | grep -i patch
--检查service运行状态
[oracle@dbrac5 ~]$ srvctl status service -d qtdbrac
Service srv_node1 is running on instance(s) qtdbrac2
Service srv_node2 is running on instance(s) qtdbrac2
--运行在错误节点的重新分配到正确节点
[oracle@dbrac5 ~]$ srvctl relocate service -d qtdbrac -s srv_node1 -i qtdbrac2 -t qtdbrac1 -f
[oracle@dbrac5 ~]$ srvctl status service -d qtdbrac
Service srv_node1 is running on instance(s) qtdbrac1
Service srv_node2 is running on instance(s) qtdbrac2
[oracle@dbrac5 ~]$
--启动db console或者 em agent