as4 上将oracle 10g rac 从10201升级到10203

    今天在将10201升级到10203,感觉rac上升级和单机上的区别主要在两个方面:要升cluster软件还有一个是rolling update 升级的概念,就是在rac中可以先将一个node 升级到10203,接着再升其余的,这样可以保证系统的高可用性.

以下为主要步骤:

1.下载patch:   并解压:
unzip p5337014_10203_LINUX.zip

2.如果采用rolling update的方式,就停掉这个节点的instance asm listener及crs,我在这不采用这种方式直接将所以的都停下来:

crs_stop -all
crsctl stop crs 分别在rac1,rac2主执行

3.升级cluster :
./runInstaller   可在下图在选择crs目录,先升cluser软件:

10834762_200810091954381.jpg


在cluster 快完成时在所有库执行以下两个脚本:
/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
 /app/oracle/product/10.2.0/crs_1/install/root102.sh
在一个节点执行完成后,我想就可以理解rolling update 是怎么来实现的了:

[root@rac1 oracle]# /app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Error while stopping resources. Possible cause: CRSD is down.
Stopping CSSD.
Unable to communicate with the CSS daemon.
[root@rac1 oracle]# /app/oracle/product/10.2.0/crs_1/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /app/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/app/oracle/product' is not owned by root
WARNING: directory '/app/oracle' 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.
.
.
10203 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 :
node 1: rac1 rac1-priv rac1
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
[root@rac1 oracle]#
[root@rac1 oracle]# vi rac1.txt
[root@rac1 oracle]# vi cluster.txt
[root@rac1 oracle]# crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    OFFLINE
ora....C2.lsnr application    ONLINE    OFFLINE
ora.rac2.gsd   application    ONLINE    OFFLINE
ora.rac2.ons   application    ONLINE    OFFLINE
ora.rac2.vip   application    ONLINE    ONLINE    rac1
ora.racdb.db   application    ONLINE    ONLINE    rac1
ora....b1.inst application    ONLINE    ONLINE    rac1
ora....b2.inst application    ONLINE    OFFLINE

rac2-> su
Password:
rac2-> /app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Error while stopping resources. Possible cause: CRSD is down.
Stopping CSSD.
Unable to communicate with the CSS daemon.
rac2-> /app/oracle/product/10.2.0/crs_1/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /app/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/app/oracle/product' is not owned by root
WARNING: directory '/app/oracle' 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.
.
.
.
10203 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 :
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully

4.  cluster 软件升级完成后,停掉database ,asm listener,升级database软件:

srvctl stop database -d racdb
srvctl stop asm -n rac1
srvctl stop asm -n rac2
srvctl stop listener -n rac1
srvctl stop listener -n rac2

./runInster

5.dbua或手工升级数据库的数据字典,我在这采用手工的方式来做:

  1. srvctl start listener -n rac1
    sqlplus /nolog

SQL> CONNECT SYS/oracle@racdb AS SYSDBA
SQL> STARTUP NOMOUNT


将  为:


SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;

SQL> SHUTDOWN

进入update模式,升级数据字典:
SQL> STARTUP UPGRADE
SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF
SQL>shutdown immediate
SQL> @?/rdbms/admin/utlrp.sql  --编译invalid包

将  为


SQL> ALTER SYSTEM SET CLUSTER_DATABASE=true SCOPE=spfile;
接着重启所以实例





 

fj.png未命名1.JPG

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10834762/viewspace-468588/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10834762/viewspace-468588/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值