`

Oracle RAC ASM 实例 从10.2.0.1 升级到 10.2.0.4 说明

 
阅读更多

. 说明

在官网看到一篇ASM 升级的文档,如下:

How To Upgrade ASM from 10.2 to 11.1 (RAC)

http://blog.csdn.net/tianlesoftware/archive/2011/04/25/6362083.aspx

Unable To Open Database After ASM Upgrade From Release 11.1 To Release 11.2

http://blog.csdn.net/tianlesoftware/archive/2011/04/25/6362184.aspx

RAC 下数据库的升级参考:

Redhat 5.4 Orcle RAC 数据库 10.2.0.1升级到 10.2.0.4

http://blog.csdn.net/tianlesoftware/archive/2010/09/16/5888069.aspx

几点说明:

1. Clusterware的版本必须要和DB 或者 ASM 的版本一致。 如果说要升级ASM 或者DB,那么就必须先要升级clusterware

Either the release version of Oracle Clusterware must be equal to the ASM release to which you want to upgrade, or you must first upgrade Oracle Clusterware. For example, you can upgrade ASM release 11.1.0.6 to 11.1.0.7 if Oracle Clusterware on your system is release 11.1.0.7, but you cannot do this if Oracle Clusterware is 11.1.0.6 or an earlier release.

2. 可以把ASM DB 一起升级,如果只升级ASM 实例的话,就像官网里提供的方法:

1)将新版本的ASM 安装到其他目录。 即安装数据库软件。

2)用旧版本的ASM 启动实例实例。

3)另开一个窗口,重新指定ORACLE_HOMEPATH等参数,指定到新版本的ORACLE软件目录。

4)在这个窗口运行dbua,选择ASM 实例进行升级。

3. 在这个实验中,我们将DB ASM 一起进行升级。 就不在分开升级。 因为虚拟机的空间不够折腾。 了解这个思路就可以了。

. 查看RAC 信息

2.1 DB 版本信息

[oracle@rac1 ~]$ export ORACLE_SID=dave1

[oracle@rac1 ~]$ sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 12 15:08:44 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SYS@dave1(rac1)>select * from v$version;

BANNER

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

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

PL/SQL Release 10.2.0.1.0 - Production

CORE 10.2.0.1.0 Production

TNS for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

SYS@dave1(rac1)>

2.2 ASM 实例版本

[oracle@rac1 ~]$ export ORACLE_SID=+ASM1

[oracle@rac1 ~]$ sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 12 18:19:29 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SYS@+ASM1(rac1)>

2.3 RAC 进程信息

[oracle@rac1 ~]$ cd /u01

[oracle@rac1 u01]$ sh crs_stat.sh

Name Target State Host

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

ora.dave.dave1.inst ONLINE ONLINE rac1

ora.dave.dave2.inst ONLINE ONLINE rac2

ora.dave.db ONLINE ONLINE rac1

ora.dave.taf.cs ONLINE ONLINE rac1

ora.dave.taf.dave1.srv ONLINE ONLINE rac1

ora.dave.taf.dave2.srv ONLINE ONLINE rac2

ora.rac1.ASM1.asm ONLINE ONLINE rac1

ora.rac1.LISTENER_RAC1.lsnr ONLINE ONLINE rac1

ora.rac1.gsd ONLINE ONLINE rac1

ora.rac1.ons ONLINE ONLINE rac1

ora.rac1.vip ONLINE ONLINE rac1

ora.rac2.ASM2.asm ONLINE ONLINE rac2

ora.rac2.LISTENER_RAC2.lsnr ONLINE ONLINE rac2

ora.rac2.gsd ONLINE ONLINE rac2

ora.rac2.ons ONLINE ONLINE rac2

ora.rac2.vip ONLINE ONLINE rac2

. 升级Clusterware

10.2.0.4patch number 是:p6810189

3.1 将升级包moutlinux系统

我的Patch 下到的本地的操作系统,网络又被网管限了速,所以直接就mountlinux上。

root用户登陆系统,执行如下命令:

mount -o username=administrator,password=12345678 //192.168.3.115/Software /mnt

mount -o username=administrator,password=bailing520 //192.168.3.115/Software /mnt

3.2 停止相关的进程

3.2.1每个节点分别停止 EM isqlplus

[oracle@rac1 bin]$ emctl stop dbconsole

[oracle@rac1 bin]$ isqlplusctl stop

3.2.2 停止相关进程

这个可以用srvctl 命令来一个一个进行,也可以用crs_stop -all 进行。

这部分内容参考Blog

Oracle RAC 启动与关闭

http://blog.csdn.net/tianlesoftware/archive/2010/03/05/5349003.aspx

[oracle@rac1 u01]$ sh crs_stat.sh

Name Target State Host

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

ora.dave.dave1.inst OFFLINE OFFLINE

ora.dave.dave2.inst OFFLINE OFFLINE

ora.dave.db OFFLINE OFFLINE

ora.dave.taf.cs OFFLINE OFFLINE

ora.dave.taf.dave1.srv OFFLINE OFFLINE

ora.dave.taf.dave2.srv OFFLINE OFFLINE

ora.rac1.ASM1.asm OFFLINE OFFLINE

ora.rac1.LISTENER_RAC1.lsnr OFFLINE OFFLINE

ora.rac1.gsd OFFLINE OFFLINE

ora.rac1.ons OFFLINE OFFLINE

ora.rac1.vip OFFLINE OFFLINE

ora.rac2.ASM2.asm OFFLINE OFFLINE

ora.rac2.LISTENER_RAC2.lsnr OFFLINE OFFLINE

ora.rac2.gsd OFFLINE OFFLINE

ora.rac2.ons OFFLINE OFFLINE

ora.rac2.vip OFFLINE OFFLINE

3.2.3 停止每个节点上的CRS

[root@rac1 ~]# /u01/app/oracle/product/crs/bin/crsctl stop crs

3.3 Nomachine工具运行runInstaller

该工具的使用,参考:

远程桌面工具 -- NoMachine

http://blog.csdn.net/tianlesoftware/archive/2010/11/11/6003610.aspx

3.3.1进行升级包的目录,运行runInstaller

[oracle@rac1 p6810189_10204_Linux-x86]$ pwd

/mnt/OracleSoftware/p6810189_10204_Linux-x86

[oracle@rac1 p6810189_10204_Linux-x86]$ cd Disk1/

[oracle@rac1 Disk1]$ ls

10204_buglist.htm install patch_note.htm response runInstaller stage

[oracle@rac1 Disk1]$ ./runInstaller -ignoreSysPreReqs

-- 因为我用的是redhat 5,所以忽略了版本检查

3.3.2 在可视化的安装窗口选择CRS_HOME。看清楚,不要选错了。然后一下步进行安装。

3.3.3 安装结束会提示运行2个脚本

The installer has detected that your Cluster Ready Services (CRS) installation is shared amongst the following nodes:

rac1

rac2

Because of the shared nature of this installation, you cannot perform a rolling upgrade of your CRS software.

To complete the installation of this patchset, you must perform the following tasks:

1. On each node, do the following:

a. Log in as the root user.

b. As root, shutdown the CRS daemons on the node

using the following command:

/u01/app/oracle/product/crs/bin/crsctl stop crs

Repeat this step until the CRS daemons on all the nodes are shutdown.

2. After all the CRS daemons on all the nodes are shutdown, run the shell script located at:

/u01/app/oracle/product/crs/install/root102.sh

This script will automatically start the CRS daemons on the patched node upon completion.

3. Wait until the script finishes and then proceed to the next node and repeat step 2.

[root@rac1 ~]# /u01/app/oracle/product/crs/bin/crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@rac1 ~]# /u01/app/oracle/product/crs/install/root102.sh

Creating pre-patch directory for saving pre-patch clusterware files

Completed patching clusterware files to /u01/app/oracle/product/crs

Relinking some shared libraries.

Relinking of patched files is complete.

WARNING: directory '/u01/app/oracle/product' is not owned by root

WARNING: directory '/u01/app/oracle' is not owned by root

WARNING: directory '/u01/app' is not owned by root

WARNING: directory '/u01' is not owned by root

Preparing to recopy patched init and RC scripts.

Recopying init and RC scripts.

Startup will be queued to init within 30 seconds.

Starting up the CRS daemons.

Waiting for the patched CRS daemons to start. This may take a while on some systems.

10204 patch successfully applied.

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node <nodenumber>: <nodename> <private interconnect name> <hostname>

node 2: rac1 rac1-priv rac1

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

clscfg -upgrade completed successfully

. 升级数据库软件

升级clusterware的时候,升级结束的时候会启动CRS服务。 我们在升级数据库的时候需要关闭这些服务。

4.1 停止相关进程

[oracle@rac1 u01]$ sh crs_stat.sh

Name Target State Host

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

ora.dave.dave1.inst ONLINE OFFLINE

ora.dave.dave2.inst ONLINE OFFLINE

ora.dave.db OFFLINE OFFLINE

ora.dave.taf.cs OFFLINE OFFLINE

ora.dave.taf.dave1.srv OFFLINE OFFLINE

ora.dave.taf.dave2.srv OFFLINE OFFLINE

ora.rac1.ASM1.asm ONLINE ONLINE rac1

ora.rac1.LISTENER_RAC1.lsnr ONLINE ONLINE rac1

ora.rac1.gsd ONLINE ONLINE rac1

ora.rac1.ons ONLINE ONLINE rac1

ora.rac1.vip ONLINE ONLINE rac1

ora.rac2.ASM2.asm ONLINE ONLINE rac2

ora.rac2.LISTENER_RAC2.lsnr ONLINE ONLINE rac2

ora.rac2.gsd ONLINE ONLINE rac2

ora.rac2.ons ONLINE ONLINE rac2

ora.rac2.vip ONLINE ONLINE rac2

[oracle@rac1 u01]$ crs_stop -all

Attempting to stop `ora.rac1.gsd` on member `rac1`

Attempting to stop `ora.rac2.gsd` on member `rac2`

Attempting to stop `ora.rac1.ons` on member `rac1`

Attempting to stop `ora.rac2.ons` on member `rac2`

Stop of `ora.rac1.ons` on member `rac1` succeeded.

Stop of `ora.rac2.gsd` on member `rac2` succeeded.

Stop of `ora.rac1.gsd` on member `rac1` succeeded.

Stop of `ora.rac2.ons` on member `rac2` succeeded.

Attempting to stop `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`

Attempting to stop `ora.rac1.ASM1.asm` on member `rac1`

Attempting to stop `ora.rac2.ASM2.asm` on member `rac2`

Attempting to stop `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2`

Stop of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.

Stop of `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2` succeeded.

Attempting to stop `ora.rac1.vip` on member `rac1`

Attempting to stop `ora.rac2.vip` on member `rac2`

Stop of `ora.rac1.vip` on member `rac1` succeeded.

Stop of `ora.rac2.vip` on member `rac2` succeeded.

Stop of `ora.rac1.ASM1.asm` on member `rac1` succeeded.

Stop of `ora.rac2.ASM2.asm` on member `rac2` succeeded.

[oracle@rac1 u01]$ sh crs_stat.sh

Name Target State Host

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

ora.dave.dave1.inst ONLINE OFFLINE

ora.dave.dave2.inst ONLINE OFFLINE

ora.dave.db OFFLINE OFFLINE

ora.dave.taf.cs OFFLINE OFFLINE

ora.dave.taf.dave1.srv OFFLINE OFFLINE

ora.dave.taf.dave2.srv OFFLINE OFFLINE

ora.rac1.ASM1.asm OFFLINE OFFLINE

ora.rac1.LISTENER_RAC1.lsnr OFFLINE OFFLINE

ora.rac1.gsd OFFLINE OFFLINE

ora.rac1.ons OFFLINE OFFLINE

ora.rac1.vip OFFLINE OFFLINE

ora.rac2.ASM2.asm OFFLINE OFFLINE

ora.rac2.LISTENER_RAC2.lsnr OFFLINE OFFLINE

ora.rac2.gsd OFFLINE OFFLINE

ora.rac2.ons OFFLINE OFFLINE

ora.rac2.vip OFFLINE OFFLINE

[oracle@rac1 u01]$

4.2Nomachine 工具连接上服务器,进行升级包的目录,运行runInstaller

在可视化的安装窗口选择ORACLE_HOME。看清楚,不要选错了。然后一下步进行安装。

4. 3 安装结束会提示用root用户在所有节点上运行一个脚本

/u01/app/oracle/product/10.2.0/db_1/root.sh

[root@rac1 ~]# /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.

. 升级ASM DB 实例

在升级界面选择升级ASM, 它会提示我们的ASM 已经是最新版本了。 因为我们前面已经升级过了Oracle 软件,ASM 实例存在与ORACLE_HOME下。所以ASM 实例已经升级过了。

所以,我们直接选择升级DB 就好了。

这个升级需要1个小时左右的时间。

. 升级完之后,在验证下ASM DB 版本

6.1 ASM 版本:

[oracle@rac1 u01]$ export ORACLE_SID=+ASM1

[oracle@rac1 u01]$ sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 12 22:04:53 2011

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

SYS@+ASM1(rac1)>

6.2 DB 版本

[oracle@rac1 u01]$ sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 12 22:02:26 2011

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

SYS@dave1(rac1)>

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

Blog http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.com

DBA1 群:62697716(); DBA2 群:62697977() DBA3 群:62697850()

DBA 超级群:63306533(); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017 聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics