系统环境:
操作系统:RedHat EL5
Cluster: Oracle CRS 10.2.0.1.0
Oracle: Oracle 10.2.0.1.0
如图所示:RAC 系统架构
二、升级数据库软件
升级数据库软件需要关闭每个节点的DBMS Instance、ASM Instance、Listener等service。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
[oracle@node1 ~]$ srvctl stop database -d prod [oracle@node1 ~]$ srvctl stop asm -n node1 [oracle@node1 ~]$ srvctl stop asm -n node2 [oracle@node1 ~]$ srvctl stop listener -n node1 [oracle@node1 ~]$ srvctl stop listener -n node2 [root@node1 ~]# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM1.asm application ONLINE ONLINE node1 ora....E1.lsnr application OFFLINE OFFLINE ora.node1.gsd application ONLINE ONLINE node1 ora.node1.ons application ONLINE ONLINE node1 ora.node1.vip application ONLINE ONLINE node1 ora....SM2.asm application OFFLINE OFFLINE ora....E2.lsnr application OFFLINE OFFLINE ora.node2.ons application OFFLINE OFFLINE ora.node2.vip application OFFLINE OFFLINE ora.prod.db application ONLINE ONLINE node2 ora....d1.inst application ONLINE ONLINE node1 ora....d2.inst application OFFLINE OFFLINE |
以Oracle的身份进行升级,补丁包和CRS采用相同的补丁包
此处,选择“Oracle 软件”安装目录
此处可以略过
开始升级安装
按照提示,在node节点执行脚本(数据库软件升级只需在一个节点完成即可)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[root @node1 ~]# /u01/app/oracle/product/ 10.2 . 0 /db_1/root.sh
Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/ 10.2 . 0 /db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y Copying dbhome to /usr/local/bin ...
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.sh script. Now product-specific root actions will be performed. |
1
|
[root@node2 ~]# /u01/app/oracle/product/ 10.2. 0 /db_1/root.sh
|
@脚本运行成功后,即可完成数据库软件的升级!
升级过程遇到的问题:
提示:tnslsnr 进程未关闭!
查看CRS service:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[oracle@node1 ~]$ crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM1.asm application OFFLINE OFFLINE ora....E1.lsnr application ONLINE ONLINE node1 ora.node1.gsd application ONLINE ONLINE node1 ora.node1.ons application ONLINE ONLINE node1 ora.node1.vip application ONLINE ONLINE node1 ora....SM2.asm application OFFLINE OFFLINE ora....E2.lsnr application ONLINE ONLINE node2 ora.node2.gsd application ONLINE ONLINE node2 ora.node2.ons application ONLINE ONLINE node2 ora.node2.vip application ONLINE ONLINE node2 ora.prod.db application OFFLINE OFFLINE ora....d1.inst application OFFLINE OFFLINE ora....d2.inst application OFFLINE OFFLINE |
错误原因:应该是忘记关闭节点上的Listener service
解决方法:关闭Listener service
1
2
3
4
5
6
7
8
|
[oracle@node1 ~]$ srvctl stop listener -h Usage: srvctl stop listener -n <node_name> [-l <lsnr_name_list>] -n <node> Node name
-l "<lsnr,...>" Comma separated listener names
-h Print usage
[oracle@node1 ~]$ srvctl stop listener -n node1 [oracle@node1 ~]$ srvctl stop listener -n node2 [oracle@node1 ~]$ netstat -an |grep 1521
|
@至此问题解决
本文转自 客居天涯 51CTO博客,原文链接:http://blog.51cto.com/tiany/1410222,如需转载请自行联系原作者