oracle 11.2.0.1 rac upgrade to 11.2.0.3

目标:
将现有的oracle 11.2.0.1 rac升级至11.2.0.3。使用out-of-space方式来升级。使用rolling upgrade方式升级。

rolling upgrade的好处就是:确保至少有一个node是能够对外提供服务的。

1.来自mos上的相关文档

mos上有文档关于11201升级至11203的内容,过程与从11201至11202是稍有区别的,详细参考:

Pre-requisite for 11.2.0.1 to 11.2.0.2 ASM Rolling Upgrade (Doc ID 1274629.1)

------------------------------------------------------------------------------
Upgrade to 11.2.0.3

If you are upgrading from previous version to 11.2.0.3, notice that upgrade process to 11.2.0.3 has been improved that CVU is used to verify the Oracle prerequisite patches before starting the upgrade. The source home patches are checked during the installer OUI. The target home patches are checked during rootupgrade.sh. cluvfy -upgrade command line can also be used to check the upgrade pre-requsite check.

For example, if cluvfy says it's missing patch for bug 9413827, then you need to apply patch 9413827 (instead of patch 9706490), because cluvfy on some platform only check for patch 9413827.

-------------------------------------------------------------------------------

改进的地方在CVU,可以使用cluvfy来做升级之前的检查。

在GI software介质的目录中,找到runcluvfy命令。

[grid@oel5-112-rac1 grid]$ pwd
/home/grid/unzipdir/grid
[grid@oel5-112-rac1 grid]$ ls
doc install readme.html response rpm runcluvfy.sh runInstaller sshsetup stage welcome.html

[grid@oel5-112-rac1 grid]$ ./runcluvfy.sh stage -pre crsinst -upgrade -n oel5-112-rac1,oel5-112-rac2 -rolling -src_crshome /u01/app/11.2.0/grid -dest_crshome /u01/app/11.2.0.3/grid -dest_version 11.2.0.3.0 -fixup -fixupdir /home/grid/fixup

Performing pre-checks for cluster services setup

Checking node reachability...
Node reachability check passed from node "oel5-112-rac1"
Checking user equivalence...
User equivalence check passed for user "grid"

Checking CRS user consistency
CRS user consistency check successful

Checking node connectivity...

Checking hosts config file...

Verification of the hosts config file successful

Check: Node connectivity for interface "eth0"
Node connectivity passed for interface "eth0"
TCP connectivity check passed for subnet "192.168.56.0"
Check: Node connectivity for interface "eth1"
Node connectivity passed for interface "eth1"
TCP connectivity check passed for subnet "172.0.10.0"

Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.56.0".
Subnet mask consistency check passed for subnet "172.0.10.0".
Subnet mask consistency check passed.

Node connectivity check passed

Checking multicast communication...

Checking subnet "192.168.56.0" for multicast communication with multicast group "230.0.1.0"...
Check of subnet "192.168.56.0" for multicast communication with multicast group "230.0.1.0" passed.

Checking subnet "172.0.10.0" for multicast communication with multicast group "230.0.1.0"...
Check of subnet "172.0.10.0" for multicast communication with multicast group "230.0.1.0" passed.

Check of multicast communication passed.

Checking OCR integrity...

OCR integrity check passed

Checking ASMLib configuration.
Check for ASMLib configuration passed.
Total memory check passed
Available memory check passed
Swap space check passed
Free disk space check passed for "oel5-112-rac2:/u01/app/11.2.0.3/grid,oel5-112-rac2:/tmp"
Free disk space check passed for "oel5-112-rac1:/u01/app/11.2.0.3/grid,oel5-112-rac1:/tmp"
Check for multiple users with UID value 54322 passed
User existence check passed for "grid"
Group existence check passed for "oinstall"
Membership check for user "grid" in group "oinstall" [as Primary] passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
Check for Oracle patch "9413827" in home "/u01/app/11.2.0/grid" failed
Check failed on nodes:
oel5-112-rac2,oel5-112-rac1
There are no oracle patches required for home "/u01/app/11.2.0.3/grid".
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Package existence check passed for "make"
Package existence check passed for "binutils"
Package existence check passed for "gcc(x86_64)"
Package existence check passed for "libaio(x86_64)"
Package existence check passed for "glibc(x86_64)"
Package existence check passed for "compat-libstdc++-33(x86_64)"
Package existence check passed for "elfutils-libelf(x86_64)"
Package existence check passed for "elfutils-libelf-devel"
Package existence check passed for "glibc-common"
Package existence check passed for "glibc-devel(x86_64)"
Package existence check passed for "glibc-headers"
Package existence check passed for "gcc-c++(x86_64)"
Package existence check passed for "libaio-devel(x86_64)"
Package existence check passed for "libgcc(x86_64)"
Package existence check passed for "libstdc++(x86_64)"
Package existence check passed for "libstdc++-devel(x86_64)"
Package existence check passed for "sysstat"
Package existence check passed for "ksh"
Check for multiple users with UID value 0 passed
Current group ID check passed

Starting check for consistency of primary group of root user

Check for consistency of root user's primary group passed
Package existence check failed for "cvuqdisk"
Check failed on nodes:
oel5-112-rac2,oel5-112-rac1

Starting Clock synchronization checks using Network Time Protocol(NTP)...

NTP Configuration file check started...
NTP Configuration file check passed
No NTP Daemons or Services were found to be running
PRVF-5507 : NTP daemon or service is not running on any node but NTP configuration file exists on the following node(s):
oel5-112-rac2,oel5-112-rac1
Clock synchronization check using Network Time Protocol(NTP) failed

Core file name pattern consistency check passed.

User "grid" is not part of "root" group. Check passed
Default user file creation mask check passed
Checking consistency of file "/etc/resolv.conf" across nodes

File "/etc/resolv.conf" does not have both domain and search entries defined
domain entry in file "/etc/resolv.conf" is consistent across nodes
search entry in file "/etc/resolv.conf" is consistent across nodes

PRVF-5636 : The DNS response time for an unreachable node exceeded "15000" ms on following nodes: oel5-112-rac2,oel5-112-rac1

File "/etc/resolv.conf" is not consistent across nodes
UDev attributes check for OCR locations started...
UDev attributes check passed for OCR locations
UDev attributes check for Voting Disk locations started...
UDev attributes check passed for Voting Disk locations

Time zone consistency check passed
Checking VIP configuration.
Checking VIP Subnet configuration.
Check for VIP Subnet configuration passed.
Checking VIP reachability
Check for VIP reachability passed.

Checking Oracle Cluster Voting Disk configuration...

ASM Running check passed. ASM is running on all specified nodes

Oracle Cluster Voting Disk configuration check passed

Clusterware version consistency passed
Fixup information has been generated for following node(s):
oel5-112-rac2,oel5-112-rac1
Please run the following script on each node as "root" user to execute the fixups:
'/tmp/CVU_11.2.0.3.0_grid/runfixup.sh'

Pre-check for cluster services setup was unsuccessful on all the nodes.
[grid@oel5-112-rac1 grid]$

仔细阅读上述的runcluvfy.sh脚本执行的输出结果,发现缺少相应的patch 9413827

-------------------------------------------------------------------------
Check for Oracle patch "9413827" in home "/u01/app/11.2.0/grid" failed
Check failed on nodes:
oel5-112-rac2,oel5-112-rac1
--------------------------------------------------------------------------

发现缺少cvuqdisk这个rpm的包

--------------------------------------------------------------------------
Package existence check failed for "cvuqdisk"
Check failed on nodes:
oel5-112-rac2,oel5-112-rac1
--------------------------------------------------------------------------

在GI软件包介质的rpm目录中,有相应的cvuqdisk包,Uvh升级安装即可(当前os有cvuqdisk包,只是版本低)
两个节点升级缺少的rpm包即可。

[root@oel5-112-rac1 ~]# rpm -Uvh cvuqdisk-1.0.9-1.rpm
Preparing... ########################################### [100%]
1:cvuqdisk ########################################### [100%]

ntp与dns的问题暂时忽略。

2.安装patch 9413827

2.1 下载patch 9413827介质:p9413827_112010_Linux-x86-64.zip与最新的opatch工具。

2.2 仔细阅读readme文件

2.3 着手打补丁,解决bug 9413827的问题,以避免后续遇到报错。
(1)将两个节点的OPatch工具替换成最新下载的这个版本

[grid@oel5-112-rac1 OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4

切换到GI的拥有者 su – grid,查看详细信息。

--------------------------------
[grid@oel5-112-rac1 OPatch]$ ./opatch lsinventory -detail -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
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.4
OUI version : 11.2.0.1.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-07-29_16-57-47PM_1.log

Lsinventory Output file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2013-07-29_16-57-47PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Grid Infrastructure 11.2.0.1.0
There are 1 products installed in this Oracle Home.
Installed Products (87):

Agent Required Support Files 10.2.0.4.2
Assistant Common Files 11.2.0.1.0
Automatic Storage Management Assistant 11.2.0.1.0
Bali Share 1.1.18.0.0
Buildtools Common Files 11.2.0.1.0
Character Set Migration Utility 11.2.0.1.0
Cluster Ready Services Files 11.2.0.1.0
Cluster Verification Utility Common Files 11.2.0.1.0
Cluster Verification Utility Files 11.2.0.1.0
Database SQL Scripts 11.2.0.1.0
Deinstallation Tool 11.2.0.1.0
Enterprise Manager Common Core Files 10.2.0.4.2
Enterprise Manager Common Files 10.2.0.4.2
Enterprise Manager Minimal Integration 11.2.0.1.0
Enterprise Manager plugin Common Files 11.2.0.1.0
Expat libraries 2.0.1.0.1
HAS Common Files 11.2.0.1.0
HAS Files for DB 11.2.0.1.0
Installation Common Files 11.2.0.1.0
Installation Plugin Files 11.2.0.1.0
Installer SDK Component 11.2.0.1.0
LDAP Required Support Files 11.2.0.1.0
OLAP SQL Scripts 11.2.0.1.0
Oracle Clusterware RDBMS Files 11.2.0.1.0
Oracle Configuration Manager Deconfiguration 10.3.1.0.0
Oracle Containers for Java 11.2.0.1.0
Oracle Core Required Support Files 11.2.0.1.0
Oracle Database 11g 11.2.0.1.0
Oracle Database 11g Multimedia Files 11.2.0.1.0
Oracle Database Deconfiguration 11.2.0.1.0
Oracle Database User Interface 2.2.13.0.0
Oracle Database Utilities 11.2.0.1.0
Oracle DBCA Deconfiguration 11.2.0.1.0
Oracle Extended Windowing Toolkit 3.4.47.0.0
Oracle Globalization Support 11.2.0.1.0
Oracle Globalization Support 11.2.0.1.0
Oracle Grid Infrastructure 11.2.0.1.0
Oracle Help For Java 4.2.9.0.0
Oracle Ice Browser 5.2.3.6.0
Oracle Internet Directory Client 11.2.0.1.0
Oracle Java Client 11.2.0.1.0
Oracle JDBC/OCI Instant Client 11.2.0.1.0
Oracle JDBC/THIN Interfaces 11.2.0.1.0
Oracle JFC Extended Windowing Toolkit 4.2.36.0.0
Oracle JVM 11.2.0.1.0
Oracle LDAP administration 11.2.0.1.0
Oracle Locale Builder 11.2.0.1.0
Oracle Multimedia 11.2.0.1.0
Oracle Multimedia Client Option 11.2.0.1.0
Oracle Multimedia Java Advanced Imaging 11.2.0.1.0
Oracle Multimedia Locator 11.2.0.1.0
Oracle Multimedia Locator RDBMS Files 11.2.0.1.0
Oracle Net 11.2.0.1.0
Oracle Net Listener 11.2.0.1.0
Oracle Net Required Support Files 11.2.0.1.0
Oracle Netca Client 11.2.0.1.0
Oracle Notification Service 11.2.0.0.0
Oracle Notification Service (eONS) 11.2.0.1.0
Oracle One-Off Patch Installer 11.2.0.0.2
Oracle Quality of Service Management (Client) 11.2.0.1.0
Oracle Quality of Service Management (Server) 11.2.0.1.0
Oracle RAC Deconfiguration 11.2.0.1.0
Oracle RAC Required Support Files-HAS 11.2.0.1.0
Oracle Recovery Manager 11.2.0.1.0
Oracle Security Developer Tools 11.2.0.1.0
Oracle Text Required Support Files 11.2.0.1.0
Oracle Universal Installer 11.2.0.1.0
Oracle Wallet Manager 11.2.0.1.0
Parser Generator Required Support Files 11.2.0.1.0
Perl Interpreter 5.10.0.0.1
Perl Modules 5.10.0.0.1
PL/SQL 11.2.0.1.0
PL/SQL Embedded Gateway 11.2.0.1.0
Platform Required Support Files 11.2.0.1.0
Precompiler Required Support Files 11.2.0.1.0
RDBMS Required Support Files 11.2.0.1.0
RDBMS Required Support Files for Instant Client 11.2.0.1.0
Required Support Files 11.2.0.1.0
Secure Socket Layer 11.2.0.1.0
SQL*Plus 11.2.0.1.0
SQL*Plus Files for Instant Client 11.2.0.1.0
SQL*Plus Required Support Files 11.2.0.1.0
SSL Required Support Files for InstantClient 11.2.0.1.0
Sun JDK 1.5.0.17.0
Universal Storage Manager Files 11.2.0.1.0
XDK Required Support Files 11.2.0.1.0
XML Parser for Java 11.2.0.1.0
There are 87 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = oel5-112-rac1
Remote node = oel5-112-rac2

--------------------------------------------------------------------------------

OPatch succeeded.
[grid@oel5-112-rac1 OPatch]$
--------------------------------

(2)切换到RDBMS_HOME的拥有者: su – oracle,做与grid一样的操作,查看rdbms上打补丁的情况信息。

[oracle@oel5-112-rac1 OPatch]$ ./opatch lsinventory -detail -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-07-29_17-10-38PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-07-29_17-10-38PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g 11.2.0.1.0
There are 1 products installed in this Oracle Home.
Installed Products (134):

Agent Required Support Files 10.2.0.4.2
Assistant Common Files 11.2.0.1.0
Bali Share 1.1.18.0.0
Buildtools Common Files 11.2.0.1.0
Character Set Migration Utility 11.2.0.1.0
Cluster Verification Utility Common Files 11.2.0.1.0
Database Configuration and Upgrade Assistants 11.2.0.1.0
Database SQL Scripts 11.2.0.1.0
Database Workspace Manager 11.2.0.1.0
Deinstallation Tool 11.2.0.1.0
Enterprise Edition Options 11.2.0.1.0
Enterprise Manager Agent 10.2.0.4.2
Enterprise Manager Agent Core Files 10.2.0.4.2
Enterprise Manager Common Core Files 10.2.0.4.2
Enterprise Manager Common Files 10.2.0.4.2
Enterprise Manager Database Plugin -- Agent Support 11.2.0.1.0
Enterprise Manager Database Plugin -- Repository Support 11.2.0.1.0
Enterprise Manager Grid Control Core Files 10.2.0.4.2
Enterprise Manager Minimal Integration 11.2.0.1.0
Enterprise Manager plugin Common Files 11.2.0.1.0
Enterprise Manager Repository Core Files 10.2.0.4.2
Exadata Storage Server 11.2.0.1.0
Expat libraries 2.0.1.0.1
Generic Connectivity Common Files 11.2.0.1.0
HAS Common Files 11.2.0.1.0
HAS Files for DB 11.2.0.1.0
Installation Common Files 11.2.0.1.0
Installation Plugin Files 11.2.0.1.0
Installer SDK Component 11.2.0.1.0
JAccelerator (COMPANION) 11.2.0.1.0
LDAP Required Support Files 11.2.0.1.0
OLAP SQL Scripts 11.2.0.1.0
Oracle 11g Warehouse Builder Required Files 11.2.0.1.0
Oracle Advanced Security 11.2.0.1.0
Oracle Application Express 11.2.0.1.0
Oracle Call Interface (OCI) 11.2.0.1.0
Oracle Clusterware RDBMS Files 11.2.0.1.0
Oracle Code Editor 1.2.1.0.0I
Oracle Configuration Manager 10.3.1.1.0
Oracle Configuration Manager Deconfiguration 10.3.1.0.0
Oracle Containers for Java 11.2.0.1.0
Oracle Core Required Support Files 11.2.0.1.0
Oracle Data Mining RDBMS Files 11.2.0.1.0
Oracle Database 11g 11.2.0.1.0
Oracle Database 11g 11.2.0.1.0
Oracle Database 11g Multimedia Files 11.2.0.1.0
Oracle Database Deconfiguration 11.2.0.1.0
Oracle Database Gateway for ODBC 11.2.0.1.0
Oracle Database User Interface 2.2.13.0.0
Oracle Database Utilities 11.2.0.1.0
Oracle Database Vault J2EE Application 11.2.0.1.0
Oracle Database Vault option 11.2.0.1.0
Oracle DBCA Deconfiguration 11.2.0.1.0
Oracle Display Fonts 9.0.2.0.0
Oracle Enterprise Manager Console DB 11.2.0.1.0
Oracle Extended Windowing Toolkit 3.4.47.0.0
Oracle Globalization Support 11.2.0.1.0
Oracle Globalization Support 11.2.0.1.0
Oracle Help For Java 4.2.9.0.0
Oracle Help for the Web 2.0.14.0.0
Oracle Ice Browser 5.2.3.6.0
Oracle Internet Directory Client 11.2.0.1.0
Oracle Java Client 11.2.0.1.0
Oracle JDBC Server Support Package 11.2.0.1.0
Oracle JDBC/OCI Instant Client 11.2.0.1.0
Oracle JDBC/THIN Interfaces 11.2.0.1.0
Oracle JFC Extended Windowing Toolkit 4.2.36.0.0
Oracle JVM 11.2.0.1.0
Oracle Label Security 11.2.0.1.0
Oracle LDAP administration 11.2.0.1.0
Oracle Locale Builder 11.2.0.1.0
Oracle Message Gateway Common Files 11.2.0.1.0
Oracle Multimedia 11.2.0.1.0
Oracle Multimedia Annotator 11.2.0.1.0
Oracle Multimedia Client Option 11.2.0.1.0
Oracle Multimedia Java Advanced Imaging 11.2.0.1.0
Oracle Multimedia Locator 11.2.0.1.0
Oracle Multimedia Locator RDBMS Files 11.2.0.1.0
Oracle Net 11.2.0.1.0
Oracle Net Listener 11.2.0.1.0
Oracle Net Required Support Files 11.2.0.1.0
Oracle Net Services 11.2.0.1.0
Oracle Netca Client 11.2.0.1.0
Oracle Notification Service 11.2.0.0.0
Oracle Notification Service (eONS) 11.2.0.1.0
Oracle ODBC Driver 11.2.0.1.0
Oracle ODBC Driverfor Instant Client 11.2.0.1.0
Oracle OLAP 11.2.0.1.0
Oracle OLAP API 11.2.0.1.0
Oracle OLAP RDBMS Files 11.2.0.1.0
Oracle One-Off Patch Installer 11.2.0.0.2
Oracle Partitioning 11.2.0.1.0
Oracle Programmer 11.2.0.1.0
Oracle Quality of Service Management (Client) 11.2.0.1.0
Oracle RAC Deconfiguration 11.2.0.1.0
Oracle RAC Required Support Files-HAS 11.2.0.1.0
Oracle Real Application Testing 11.2.0.1.0
Oracle Recovery Manager 11.2.0.1.0
Oracle Security Developer Tools 11.2.0.1.0
Oracle Spatial 11.2.0.1.0
Oracle SQL Developer 11.2.0.1.0
Oracle Starter Database 11.2.0.1.0
Oracle Text 11.2.0.1.0
Oracle Text Required Support Files 11.2.0.1.0
Oracle UIX 2.2.24.5.0
Oracle Universal Connection Pool 11.2.0.1.0
Oracle Universal Installer 11.2.0.1.0
Oracle Wallet Manager 11.2.0.1.0
Oracle XML Development Kit 11.2.0.1.0
Oracle XML Query 11.2.0.1.0
Parser Generator Required Support Files 11.2.0.1.0
Perl Interpreter 5.10.0.0.1
Perl Modules 5.10.0.0.1
PL/SQL 11.2.0.1.0
PL/SQL Embedded Gateway 11.2.0.1.0
Platform Required Support Files 11.2.0.1.0
Precompiler Common Files 11.2.0.1.0
Precompiler Required Support Files 11.2.0.1.0
Provisioning Advisor Framework 10.2.0.4.2
RDBMS Required Support Files 11.2.0.1.0
RDBMS Required Support Files for Instant Client 11.2.0.1.0
regexp 2.1.9.0.0
Required Support Files 11.2.0.1.0
Sample Schema Data 11.2.0.1.0
Secure Socket Layer 11.2.0.1.0
SQL*Plus 11.2.0.1.0
SQL*Plus Files for Instant Client 11.2.0.1.0
SQL*Plus Required Support Files 11.2.0.1.0
SQLJ Runtime 11.2.0.1.0
SSL Required Support Files for InstantClient 11.2.0.1.0
Sun JDK 1.5.0.17.0
XDK Required Support Files 11.2.0.1.0
XML Parser for Java 11.2.0.1.0
XML Parser for Oracle JVM 11.2.0.1.0
There are 134 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = oel5-112-rac1
Remote node = oel5-112-rac2

--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@oel5-112-rac1 OPatch]$

(4)切换到rdbms的拥有者,停止db home相关的资源。

在节点1上,以oracle用户执行相关命令。

-----------------------
[oracle@oel5-112-rac1 ~]$ whoami
oracle
[oracle@oel5-112-rac1 ~]$ srvctl stop home -o $ORACLE_HOME -n oel5-112-rac1 -s stop_db_resource
[oracle@oel5-112-rac1 ~]$

看看那个state file中有什么内容。生成的state file中,只有db-racdb

[oracle@oel5-112-rac1 ~]$ more stop_db_resource
db-racdb
———————–

(5)以root用户执行命令,unlock锁定的文件

[root@oel5-112-rac1 install]# whoami
root
[root@oel5-112-rac1 install]# pwd
/u01/app/11.2.0/grid/crs/install
[root@oel5-112-rac1 install]# ./rootcrs.pl -unlock
2013-07-30 09:24:08: Parsing the host name
2013-07-30 09:24:08: Checking for super user privileges
2013-07-30 09:24:08: User has super user privileges
Using configuration parameter file: ./crsconfig_params
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'oel5-112-rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.oc4j' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.gsd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.FLASHAREA.dg' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.gsd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.oel5-112-rac1.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.oel5-112-rac1.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.oel5-112-rac1.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.scan1.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'oel5-112-rac2'
CRS-2676: Start of 'ora.scan1.vip' on 'oel5-112-rac2' succeeded
CRS-2676: Start of 'ora.oel5-112-rac1.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.FLASHAREA.dg' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'oel5-112-rac2'
CRS-2676: Start of 'ora.oc4j' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.eons' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.ons' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.net1.network' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.eons' on 'oel5-112-rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.cssd' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.diskmon' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.gpnpd' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.gipcd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'oel5-112-rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully unlock /u01/app/11.2.0/grid

由上面的输出也可以看出,节点1上的crs已经被关闭了,相应的原来在节点1上的resource应该此时都启动到了节点2上。

[grid@oel5-112-rac1 ~]$ crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.

(6) Save the RDBMS home configuration settings

以rdbms home owner执行脚本,来保存rdbms home的相关配置信息。

[oracle@oel5-112-rac1 scripts]$ pwd
/home/oracle/9413827/custom/server/9413827/custom/scripts
[oracle@oel5-112-rac1 scripts]$ ls
postpatch.sh prepatch.sh
[oracle@oel5-112-rac1 scripts]$ whoami
oracle

[oracle@oel5-112-rac1 scripts]$ ./prepatch.sh -dbhome $ORACLE_HOME
./prepatch.sh completed successfully.

(7) 开始进行实际的apply patch
apply patch的过程分为:crs_home apply和rdbms_home apply这两个过程。

apply patch on CRS_HOME。以grid用户执行,它是crs_home的owner

[grid@oel5-112-rac1 9413827]$ /u01/app/11.2.0/grid/OPatch/opatch napply -local -oh $ORACLE_HOME -id 9413827
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
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.4
OUI version : 11.2.0.1.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-07-30_09-50-32AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 9413827

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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 http://www.oracle.com/support/policies.html 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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '9413827' to OH '/u01/app/11.2.0/grid'

Patching component oracle.crs, 11.2.0.1.0...

Verifying the update...
Patch 9413827 successfully applied.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-07-30_09-50-32AM_1.log

CRS_HOME patch apply过程结束。
开始rdbms_home的patch apply过程,需要以oracle用户执行

[oracle@oel5-112-rac1 9413827]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch napply custom/server/ -local -oh $ORACLE_HOME -id 9413827
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-07-30_10-10-31AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 9413827

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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 http://www.oracle.com/support/policies.html 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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]

y
User Responded with: Y
Backing up files...
Applying interim patch '9413827' to OH '/u01/app/oracle/product/11.2.0/db_1'

Patching component oracle.rdbms, 11.2.0.1.0...

Verifying the update...
Patch 9413827 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-07-30_10-10-31AM_1.log

OPatch succeeded.

rdbms_home patch apply在第一个节点上结束。

(8)configure home
configure home包括:configure crs_home与rdbms_home

configure crs_home

[root@oel5-112-rac1 oel5-112-rac1]# ll
total 216
drwxr-xr-x 2 grid oinstall 4096 Jul 16 13:10 admin
drwxr-xr-x 4 grid oinstall 4096 Jul 16 13:10 agent
-rwxr-xr-x 1 grid oinstall 153354 Jul 30 09:24 alertoel5-112-rac1.log
drwxr-xr-x 2 grid oinstall 4096 Jul 29 16:07 client
drwxr-xr-x 2 grid oinstall 4096 Jul 16 13:12 crsd
drwxr-xr-x 2 grid oinstall 4096 Jul 29 21:55 cssd
drwxr-xr-x 2 grid oinstall 4096 Jul 29 07:20 ctssd
drwxr-xr-x 2 grid oinstall 4096 Jul 17 12:55 diskmon
drwxr-xr-x 2 grid oinstall 4096 Jul 16 13:15 evmd
drwxr-xr-x 2 grid oinstall 4096 Jul 16 13:11 gipcd
drwxr-xr-x 2 grid oinstall 4096 Jul 16 13:10 gnsd
drwxr-xr-x 2 grid oinstall 4096 Jul 29 09:25 gpnpd
drwxr-xr-x 2 grid oinstall 4096 Jul 16 13:11 mdnsd
drwxr-xr-x 2 grid oinstall 4096 Jul 29 19:22 ohasd
drwxr-xr-x 5 grid oinstall 4096 Jul 18 14:41 racg
drwxr-xr-x 2 grid oinstall 4096 Jul 30 09:24 srvm
[root@oel5-112-rac1 oel5-112-rac1]# pwd
/u01/app/11.2.0/grid/log/oel5-112-rac1

以root执行

[root@oel5-112-rac1 ~]# chmod +w /u01/app/11.2.0/grid/log/oel5-112-rac1/agent
[root@oel5-112-rac1 ~]# chmod +w /u01/app/11.2.0/grid/log/oel5-112-rac1/agent/crsd

configure rdbms_home:以oracle用户执行

[oracle@oel5-112-rac1 scripts]$ pwd
/home/oracle/9413827/custom/server/9413827/custom/scripts
[oracle@oel5-112-rac1 scripts]$ ./postpatch.sh -dbhome $ORACLE_HOME
Reading /u01/app/oracle/product/11.2.0/db_1/install/params.ora..
Reading /u01/app/oracle/product/11.2.0/db_1/install/params.ora..
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/racgwrap
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/srvctl
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/srvconfig
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/cluvfy
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/racgwrap
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/srvctl
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/srvconfig
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/cluvfy
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/racgwrap
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/srvctl
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/srvconfig
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/cluvfy
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/racgmain
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/racgeut
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/diskmon.bin
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/lsnodes
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/osdbagrp
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/rawutl
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/srvm/admin/ractrans
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/srvm/admin/getcrshome
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/gnsd
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/crsdiag.pl
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libhasgen11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libclsra11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libdbcfg11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libocr11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libocrb11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libocrutl11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libuini11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/librdjni11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libgns11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libgnsjni11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libagfw11.so
[oracle@oel5-112-rac1 scripts]$

(9)restore the security settings on crs home
以root执行

[root@oel5-112-rac1 install]# pwd
/u01/app/11.2.0/grid/crs/install
[root@oel5-112-rac1 install]# ./rootcrs.pl -patch
2013-07-30 10:32:08: Parsing the host name
2013-07-30 10:32:08: Checking for super user privileges
2013-07-30 10:32:08: User has super user privileges
Using configuration parameter file: ./crsconfig_params
acfsroot: ACFS-9301: ADVM/ACFS installation can not proceed:

acfsroot: ACFS-9302: No installation files found at /u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5uek-x86_64/

CRS-4123: Oracle High Availability Services has been started.

[root@oel5-112-rac1 ~]# ls -l /home/oracle
total 324124
drwxr-xr-x 5 oracle oinstall 4096 Oct 25 2010 9413827
-rw-r--r-- 1 oracle oinstall 15663 Jul 16 16:22 db.rsp
drwxr-xr-x 2 oracle oinstall 4096 Jul 16 14:27 Desktop
drwxrwxr-x 8 oracle oinstall 4096 Mar 27 04:49 OPatch
drwxr-x--- 3 oracle oinstall 4096 Jul 16 22:32 oradiag_oracle
-rw-r--r-- 1 oracle oinstall 32551984 Jul 29 16:31 p6880880_112000_Linux-x86-64.zip
-rw-r--r-- 1 oracle oinstall 298972922 Jul 30 09:34 p9413827_112010_Linux-x86-64.zip
-rw-r--r-- 1 oracle oinstall 9 Jul 30 09:15 stop_db_resource
[root@oel5-112-rac1 ~]# /u01/app/oracle/product/11.2.0/db_1/bin/srvctl start home -o $ORACLE_HOME -s /home/oracle/stop_db_resource -n oel5-112-rac1
[root@oel5-112-rac1 ~]#

stop_db_resource这个state_file是开始的时候,以oracle用户执行srvctl stop home命令时创建的。在/home/oracle目录下面。

可以使用如下的命令,验证在节点1上,刚才补丁是否打上了。

% opatch lsinventory -detail -oh <CRS_HOME>
% opatch lsinventory -detail -oh <RDBMS_HOME>

–至此:在节点1上的patch 9413827的补丁安装工作完毕了。

3.在节点2上开始上述与节点1同样过程的补丁安装。

3.1 shutdown the resource running from db home

以oracle用户执行

[oracle@oel5-112-rac2 db_1]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/stop_db_resource -n oel5-112-rac2
[oracle@oel5-112-rac2 db_1]$ cat /home/oracle/stop_db_resource
db-racdb
[oracle@oel5-112-rac2 db_1]$

3.2 unlock the protected files
unlock的过程基本就是在”停止当前节点的CRS”

[root@oel5-112-rac2 install]# ./rootcrs.pl -unlock
2013-07-30 11:01:02: Parsing the host name
2013-07-30 11:01:02: Checking for super user privileges
2013-07-30 11:01:02: User has super user privileges
Using configuration parameter file: ./crsconfig_params
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.crsd' on 'oel5-112-rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.FLASHAREA.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.oc4j' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.gsd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gsd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.scan1.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.oel5-112-rac2.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.oel5-112-rac2.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.oel5-112-rac2.vip' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.scan1.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.oel5-112-rac2.vip' on 'oel5-112-rac1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.FLASHAREA.dg' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.oc4j' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.ons' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.ons' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.net1.network' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.eons' on 'oel5-112-rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.cssd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.diskmon' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gpnpd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gipcd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'oel5-112-rac2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully unlock /u01/app/11.2.0/grid
[root@oel5-112-rac2 install]#

可以看看另外一个节点的resource情况,可以看到和预计的一样。在节点2上执行的unlock操作,节点2
上的crs被关闭了,资源都转移到另外一个节点了。

[oracle@oel5-112-rac2 db_1]$ ssh oel5-112-rac1
Last login: Tue Jul 30 09:01:44 2013 from 192.168.56.101
[oracle@oel5-112-rac1 ~]$ su - grid
Password:
[grid@oel5-112-rac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE oel5...rac1
ora....AREA.dg ora....up.type ONLINE ONLINE oel5...rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE oel5...rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE oel5...rac1
ora....VOTE.dg ora....up.type ONLINE ONLINE oel5...rac1
ora.asm ora.asm.type ONLINE ONLINE oel5...rac1
ora.eons ora.eons.type ONLINE ONLINE oel5...rac1
ora.gsd ora.gsd.type ONLINE ONLINE oel5...rac1
ora....network ora....rk.type ONLINE ONLINE oel5...rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE oel5...rac1
ora....SM1.asm application ONLINE ONLINE oel5...rac1
ora....C1.lsnr application ONLINE ONLINE oel5...rac1
ora....ac1.gsd application ONLINE ONLINE oel5...rac1
ora....ac1.ons application ONLINE ONLINE oel5...rac1
ora....ac1.vip ora....t1.type ONLINE ONLINE oel5...rac1
ora....ac2.vip ora....t1.type ONLINE ONLINE oel5...rac1
ora.ons ora.ons.type ONLINE ONLINE oel5...rac1
ora.racdb.db ora....se.type ONLINE ONLINE oel5...rac1
ora.scan1.vip ora....ip.type ONLINE ONLINE oel5...rac1
[grid@oel5-112-rac1 ~]$

在unlock操作的节点上:

[grid@oel5-112-rac2 ~]$ crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.

[grid@oel5-112-rac2 ~]$

3.3 save the rdbms configuration settings

以oracle用户执行操作。

[oracle@oel5-112-rac2 scripts]$ ls
postpatch.sh prepatch.sh
[oracle@oel5-112-rac2 scripts]$ ./prepatch.sh -dbhome $ORACLE_HOME
./prepatch.sh completed successfully.
[oracle@oel5-112-rac2 scripts]$ pwd
/home/oracle/9413827/custom/server/9413827/custom/scripts
[oracle@oel5-112-rac2 scripts]$

3.4 patch CRS_HOME
以grid用户操作、执行。

[grid@oel5-112-rac2 9413827]$ /u01/app/11.2.0/grid/OPatch/opatch napply -local -oh $ORACLE_HOME -id 9413827
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
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.4
OUI version : 11.2.0.1.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-07-30_12-38-06PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 9413827

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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 http://www.oracle.com/support/policies.html 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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '9413827' to OH '/u01/app/11.2.0/grid'

Patching component oracle.crs, 11.2.0.1.0...

Verifying the update...
Patch 9413827 successfully applied.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-07-30_12-38-06PM_1.log

OPatch succeeded.
-----------------------------------------------------------------

3.5 patch rdbms_home

以oracle用户执行

[oracle@oel5-112-rac2 ~]$ cd 9413827/
[oracle@oel5-112-rac2 9413827]$ ls
custom etc files README.txt
[oracle@oel5-112-rac2 9413827]$ pwd
/home/oracle/9413827
[oracle@oel5-112-rac2 9413827]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch napply custom/server/ -local -oh $ORACLE_HOME -id 9413827
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-07-30_12-44-40PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 9413827

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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 http://www.oracle.com/support/policies.html 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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '9413827' to OH '/u01/app/oracle/product/11.2.0/db_1'

Patching component oracle.rdbms, 11.2.0.1.0...

Verifying the update...
Patch 9413827 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-07-30_12-44-40PM_1.log

OPatch succeeded.

3.6 configure the crs_home
以root执行

[root@oel5-112-rac2 ~]# chmod +w /u01/app/11.2.0/grid/log/oel5-112-rac2/agent/
[root@oel5-112-rac2 ~]# chmod +w /u01/app/11.2.0/grid/log/oel5-112-rac2/agent/crsd

3.7 configure the rdbms_home
以oracle用户执行

[oracle@oel5-112-rac2 scripts]$ pwd
/home/oracle/9413827/custom/server/9413827/custom/scripts
[oracle@oel5-112-rac2 scripts]$ ls
postpatch.sh prepatch.sh
[oracle@oel5-112-rac2 scripts]$ ./postpatch.sh -dbhome $ORACLE_HOME
Reading /u01/app/oracle/product/11.2.0/db_1/install/params.ora..
Reading /u01/app/oracle/product/11.2.0/db_1/install/params.ora..
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/racgwrap
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/srvctl
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/srvconfig
Parsing file /u01/app/oracle/product/11.2.0/db_1/bin/cluvfy
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/racgwrap
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/srvctl
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/srvconfig
Verifying file /u01/app/oracle/product/11.2.0/db_1/bin/cluvfy
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/racgwrap
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/srvctl
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/srvconfig
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/cluvfy
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/racgmain
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/racgeut
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/diskmon.bin
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/lsnodes
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/osdbagrp
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/rawutl
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/srvm/admin/ractrans
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/srvm/admin/getcrshome
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/gnsd
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/bin/crsdiag.pl
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libhasgen11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libclsra11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libdbcfg11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libocr11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libocrb11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libocrutl11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libuini11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/librdjni11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libgns11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libgnsjni11.so
Reapplying file permissions on /u01/app/oracle/product/11.2.0/db_1/lib/libagfw11.so
[oracle@oel5-112-rac2 scripts]$
-----------------------------------------

3.8 restore the security settings
以root执行

[root@oel5-112-rac2 install]# pwd
/u01/app/11.2.0/grid/crs/install
[root@oel5-112-rac2 install]# ./rootcrs.pl -patch
2013-07-30 13:00:35: Parsing the host name
2013-07-30 13:00:35: Checking for super user privileges
2013-07-30 13:00:35: User has super user privileges
Using configuration parameter file: ./crsconfig_params
acfsroot: ACFS-9301: ADVM/ACFS installation can not proceed:
acfsroot: ACFS-9302: No installation files found at /u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5uek-x86_64

CRS-4123: Oracle High Availability Services has been started
[root@oel5-112-rac2 install]# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1/
[root@oel5-112-rac2 install]# $ORACLE_HOME/bin/srvctl start home -o $ORACLE_HOME -s /home/oracle/stop_db_resource -n oel5-112-rac2

3.9 节点2上的patch 9413827 apply基本结束了,可以通过lsinventory来验证一下GI与rdbms的补丁安装情况

4.进入正题,将整个RAC集群从11.2.0.1升级至11.2.0.3上。其中包括:GI、oracle_home、instance的数据字典。

4.1 升级GI
GI的介质应该是p10404530_112030_Linux-x86-64_3of7.zip,11g之后,p10404530_112030_Linux-x86-64包括7个介质,升级即是完整的安装了。

(1)准备out-of-space升级的目录
//准备grid升级所需的目录。$ORACLE_BASE目录/u01/app/grid不变,$ORACLE_HOME目录变为:/u01/app/11.2.0.3/grid
//两个节点上都要创建目录

[root@oel5-112-rac1 ~]# mkdir -p /u01/app/11.2.0.3/grid
[root@oel5-112-rac1 ~]# chown -R grid:oinstall /u01/app/11.2.0.3/grid/
[root@oel5-112-rac1 ~]# chmod -R 775 /u01/app/11.2.0.3/grid/

//准备oracle_home所需要的目录,两个节点都要创建

[root@oel5-112-rac1 ~]# mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
[root@oel5-112-rac1 ~]# chown -R oracle:oinstall /u01/app/oracle/product/11.2.0.3/db_1/
[root@oel5-112-rac1 ~]# chmod -R 775 /u01/app/oracle/product/11.2.0.3/db_1/

—-实际操作过程截屏——

[root@oel5-112-rac1 ~]# mkdir -p /u01/app/11.2.0.3/grid
[root@oel5-112-rac1 ~]# chown -R grid:oinstall /u01/app/11.2.0.3/grid/
[root@oel5-112-rac1 ~]# chmod -R 775 /u01/app/11.2.0.3/grid/

[root@oel5-112-rac1 ~]# mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
[root@oel5-112-rac1 ~]# chown -R oracle:oinstall /u01/app/oracle/product/11.2.0.3/db_1/
[root@oel5-112-rac1 ~]# chmod -R 775 /u01/app/oracle/product/11.2.0.3/db_1/
------------------------------------

//别忘记在另外节点也操作。

(2)进入grid的介质,准备升级GI。

首先unset 环境变量:

unset ORACLE_BASE ORACLE_HOME ORACLE_SID
——————————————————————–
[grid@oel5-112-rac1 grid]$ unset ORACLE_HOME ORACLE_BASE ORACLE_SID
[grid@oel5-112-rac1 grid]$ echo $ORACLE_HOME

[grid@oel5-112-rac1 grid]$
——————————————————————–
开始runInstaller(执行runInstaller之前,我并没有停止crs以及上面的任何resource)

//详见截图

//图形化结束后,在两个节点执行rootupgrade.sh

//先在节点1上执行:
//在节点1上执行rootupgrade.sh之后,节点1的crs会被短暂关闭,然后原来在节点1上的resource都跑到节点2上了。

[root@oel5-112-rac1 grid]# ./rootupgrade.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0.3/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0.3/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation

ASM upgrade has started on first node.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'oel5-112-rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.oc4j' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.racdb.db' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.gsd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.scan1.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gsd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.oel5-112-rac1.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.oel5-112-rac1.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.oel5-112-rac1.vip' on 'oel5-112-rac2'
CRS-2676: Start of 'ora.scan1.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2'
CRS-2676: Start of 'ora.oel5-112-rac1.vip' on 'oel5-112-rac2' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.racdb.db' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.FLASHAREA.dg' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.DATA.dg' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.FLASHAREA.dg' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac1' succeeded
CRS-2676: Start of 'ora.oc4j' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.ons' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.ons' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.net1.network' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.eons' on 'oel5-112-rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.cssd' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oel5-112-rac1'
CRS-2673: Attempting to stop 'ora.diskmon' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.gpnpd' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.gipcd' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'oel5-112-rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
OLR initialization - successful
Replacing Clusterware entries in inittab
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

期间在另外一个节点上查询crs状态,发现resource都跑到节点2上了。之后,跑到节点2上的resource,会回来。

[grid@oel5-112-rac2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE oel5...rac2
ora....AREA.dg ora....up.type ONLINE ONLINE oel5...rac2
ora....ER.lsnr ora....er.type ONLINE ONLINE oel5...rac2
ora....N1.lsnr ora....er.type ONLINE ONLINE oel5...rac2
ora....VOTE.dg ora....up.type ONLINE ONLINE oel5...rac2
ora.asm ora.asm.type ONLINE ONLINE oel5...rac2
ora.eons ora.eons.type ONLINE ONLINE oel5...rac2
ora.gsd ora.gsd.type ONLINE ONLINE oel5...rac2
ora....network ora....rk.type ONLINE ONLINE oel5...rac2
ora.oc4j ora.oc4j.type ONLINE ONLINE oel5...rac2
ora....ac1.vip ora....t1.type ONLINE ONLINE oel5...rac2
ora....SM2.asm application ONLINE ONLINE oel5...rac2
ora....C2.lsnr application ONLINE ONLINE oel5...rac2
ora....ac2.gsd application ONLINE ONLINE oel5...rac2
ora....ac2.ons application ONLINE ONLINE oel5...rac2
ora....ac2.vip ora....t1.type ONLINE ONLINE oel5...rac2
ora.ons ora.ons.type ONLINE ONLINE oel5...rac2
ora.racdb.db ora....se.type ONLINE ONLINE oel5...rac2
ora.scan1.vip ora....ip.type ONLINE ONLINE oel5...rac2

//在节点2上执行rootupgrade.sh
//同样,在执行时。节点2上的resource会漂移到节点1上。

[root@oel5-112-rac2 grid]# ./rootupgrade.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0.3/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0.3/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.crsd' on 'oel5-112-rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.oc4j' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.gsd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.racdb.db' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gsd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.oel5-112-rac2.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.oel5-112-rac2.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.oel5-112-rac2.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.scan1.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.oel5-112-rac2.vip' on 'oel5-112-rac1' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.racdb.db' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.FLASHAREA.dg' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.DATA.dg' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.FLASHAREA.dg' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac2' succeeded
CRS-2676: Start of 'ora.oc4j' on 'oel5-112-rac1' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.ons' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.ons' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.net1.network' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.eons' on 'oel5-112-rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.cssd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.diskmon' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gpnpd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gipcd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'oel5-112-rac2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oel5-112-rac2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
OLR initialization - successful
Replacing Clusterware entries in inittab
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
Started to upgrade the CSS.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Oracle Clusterware operating version was successfully set to 11.2.0.3.0

ASM upgrade has finished on last node.
PRKO-2116 : OC4J is already enabled
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@oel5-112-rac2 grid]#

最后在cluster verify时会有两个failed项,参考截图。

更改两个节点上的grid用户的环境变量,将.bash_profile中的ORACLE_HOME内容替换成相应的新的目录。

5.升级rdbms home

unset环境变量
[oracle@oel5-112-rac1 ~]$ unset ORACLE_BASE ORACLE_HOME ORACLE_SID

//runInstaller…check out the screenshots

//check out the output on node1

[root@oel5-112-rac1 db_1]# ./root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.3/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@oel5-112-rac1 db_1]#

//on node2
[root@oel5-112-rac2 db_1]# ./root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.3/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

6.更新所有节点中的oracle用户下面的.bash_profile文件,更改其中的ORACLE_HOME相关环境变量,
更改对应新的软件目录。

7.验证版本

验证GI的版本

[grid@oel5-112-rac1 ~]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]

验证rdbms的版本

//让更改后的环境变量生效,rdbms_home软件与instance的数据字典都已经升级至11.2.0.3

[oracle@oel5-112-rac2 ~]$ source .bash_profile
[oracle@oel5-112-rac2 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.3/db_1
[oracle@oel5-112-rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 31 08:50:36 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> set linesize 180
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

详细的文档请参考:oracle11201rac_upgrade_11203