登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

li.angshan 的博客

关注数据计算领域

 
 
 

日志

 
 
 
 

rac 1201 升级1203  

2009-10-29 11:58:48|  分类: oracle 升级 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
今天在将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软件:

rac 1201 升级1203 - 梁山 - li.angshan 的博客


在cluster 快完成时在所有库执行以下两个脚本:
/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs

/app/oracle/product/10.2.0/crs_1/install/root102.sh

一个节点一个节点执行:


[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 <nodenumber>: <nodename> <private interconnect name> <hostname>
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 <nodenumber>: <nodename> <private interconnect name> <hostname>
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 devdb
srvctl stop asm -n rac1
srvctl stop asm -n rac2
srvctl stop listener -n rac1
srvctl stop listener -n rac2

重新运行 ./runInster
选择database目录

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

srvctl start listener -n 
rac1
sqlplus / as sysdba

SQL> CONNECTSYS/oracle@racdbAS SYSDBA
SQL> STARTUP NOMOUNT


将 de>CLUSTER_DATABASEde>为de>FALSEde>:


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包

将 de>CLUSTER_DATABASEde>为true:


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


  评论这张
 
阅读(258)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018