系统环境:
操作系统:RedHat EL5
Cluster: Oracle CRS 10.2.0.1.0
Oracle: Oracle 10.2.0.1.0
如图所示:RAC 系统架构
三、升级数据库
数据库的升级需要关闭DataBase,可以采用DBUA以图形的方式升级,也可以采用sqlplus 命令(catupgrd.sql 脚本),本案例采用dbua方式升级。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
[root
@node2
~]# srvctl start listener -n node1
[root
@node2
~]# srvctl start listener -n node2
[root
@node2
~]# srvctl start asm -n node1
[root
@node2
~]# srvctl start asm -n node2
[root
@node2
~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
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 ONLINE ONLINE node2
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
|
以Oracle身份,执行dbua 开始升级:
执行dbua,开始升级
选择“Update DataBase"
升级数据库:prod
升级后,编译失效Object
指定Recovery Area
升级summary
升级组件
升级完成后,在所有node执行以下脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
[root@node1 ~]# su - oracle
[oracle@node1 ~]$ /u01/app/oracle/product/
10.2.
0
/db_1/install/changePerm.sh
-------------------------------------------------------------------------------
Disclaimer: The purpose of
this
script is to relax permissions
on
some of the
files
in
the database Oracle Home so that all clients can access them.
Please note that Oracle Corporation recommends using the most restrictive file
permissions
as
possible
for
your given implementation. Running
this
script
should be done only
after
considering all security ramifications.
-------------------------------------------------------------------------------
Do you wish to
continue
(y/n) [n]: y
Spooling the error log /tmp/changePerm_err.log...
Finished running the script successfully
[oracle@node2 ~]$ /u01/app/oracle/product/
10.2.
0
/db_1/install/changePerm.sh
-------------------------------------------------------------------------------
Disclaimer: The purpose of
this
script is to relax permissions
on
some of the
files
in
the database Oracle Home so that all clients can access them.
Please note that Oracle Corporation recommends using the most restrictive file
permissions
as
possible
for
your given implementation. Running
this
script
should be done only
after
considering all security ramifications.
-------------------------------------------------------------------------------
Do you wish to
continue
(y/n) [n]: y
Spooling the error log /tmp/changePerm_err.log...
Finished running the script successfully
|
升级后验证:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
[oracle
@node2
~]$ sqlplus
'/as sysdba'
SQL*Plus: Release
10.2
.
0.4
.
0
- Production on Mon May
12
17
:
41
:
19
2014
Copyright (c)
1982
,
2007
, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release
10.2
.
0.4
.
0
- Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name,status from gv$instance;
INSTANCE_NAME STATUS
---------------- ------------
prod2 OPEN
prod1 OPEN
SQL> col COMP_NAME
for
a40
SQL> col version
for
a30
SQL> set linesize
120
SQL> select comp_name,version,status from dba_registry
COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ ----------------------
Oracle Enterprise Manager
10.2
.
0.4
.
0
VALID
Spatial
10.2
.
0.4
.
0
VALID
Oracle interMedia
10.2
.
0.4
.
0
VALID
OLAP Catalog
10.2
.
0.4
.
0
VALID
Oracle XML Database
10.2
.
0.4
.
0
VALID
Oracle Text
10.2
.
0.4
.
0
VALID
Oracle Expression Filter
10.2
.
0.4
.
0
VALID
Oracle Rule Manager
10.2
.
0.4
.
0
VALID
Oracle Workspace Manager
10.2
.
0.4
.
3
VALID
Oracle Data Mining
10.2
.
0.4
.
0
VALID
Oracle Database Catalog Views
10.2
.
0.4
.
0
VALID
COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ ----------------------
Oracle Database Packages and Types
10.2
.
0.4
.
0
VALID
JServer JAVA Virtual Machine
10.2
.
0.4
.
0
VALID
Oracle XDK
10.2
.
0.4
.
0
VALID
Oracle Database Java Packages
10.2
.
0.4
.
0
VALID
OLAP Analytic Workspace
10.2
.
0.4
.
0
VALID
Oracle OLAP API
10.2
.
0.4
.
0
VALID
Oracle Real Application Clusters
10.2
.
0.4
.
0
VALID
18
rows selected.
[oracle
@node2
~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
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 ONLINE ONLINE node2
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 ONLINE ONLINE node2
ora....d1.inst application ONLINE ONLINE node1
ora....d2.inst application ONLINE ONLINE node2
|
@至此,RAC的升级任务全部完成,时长在4个小时左右!
本文转自 客居天涯 51CTO博客,原文链接:http://blog.51cto.com/tiany/1410272,如需转载请自行联系原作者