Oracle10.2.0.1RAC 升级 Oracle10.2.0.5案例分享 -CRS篇

来源:互联网 发布:知乎与豆瓣 编辑:程序博客网 时间:2024/05/18 18:54
Oracle10.2.0.1RAC 升级 Oracle10.2.0.5案例分享 -CRS篇
这是一次数据库升级的案例。原有的数据库是Oracle9i 9.2.0.7 双节点RAC,运行在AIX5.3.0.0操作系统上。由于应用程序的限制,只能升级到Oracle10g 10.2.0.5。 Oracle10g 10.2.0.5没有独立的安装包,需要先安装Oracle10.2.0.1在通过升级包来升级到该版本。在新服务器上安装和升级的好处是不需要升级数据字典,在完成集群软件和数据库软件的升级后直接使用dbca创建数据库就可以了,省去一些步骤。

oracle10.2.0.5升级包解压缩后是一个Disk1文件夹,并没有区分集群软件和数据库软件。在我们手动安装时根据输入CRS_HOME和ORACLE_HOME来区分所升级的项目。

本次采用的介质如下
集群软件 :  10gr2_aix5l64_cluster.cpio.gz,
数据库软件:10gr2_aix5l64_database.cpio.gz,
升级包:      p8202632_10205_AIX64-5L_1of2.zip, p8202632_10205_AIX64-5L_2of2.zip

实施环境

Oracle10g RAC+ASM

AIX:5.3_X86_64

SQL> sqlplus / as sysdba
DB version:10.2.0.1

$ crsctl query crs softwareversion
CRS version:10.2.0.1

节点1:scgl1
         Instance:PROD1
         $ORACLE_HOME:/u01/app/oracle/product/10.2.0/db_1
         $CRS_HOME:/u01/app/oracle/product/10.2.0/crs_1

节点2:scgl2
         Instance:PROD2
         $ORACLE_HOME:/u01/app/oracle/product/10.2.0/db_1
         $CRS_HOME:/u01/app/oracle/product/10.2.0/crs_1


集群软件升级(10.2.0.1 - 10.2.0.5)

PATCH: p8202632_10205_AIX64-5L_1of2.zip, p8202632_10205_AIX64-5L_2of2.zip

1. 关闭crs资源

$ crs_stop -all

$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.scgl1.gsd  application    OFFLINE   OFFLINE
ora.scgl1.ons  application    OFFLINE   OFFLINE
ora.scgl1.vip  application    OFFLINE   OFFLINE
ora.scgl2.gsd  application    OFFLINE   OFFLINE
ora.scgl2.ons  application    OFFLINE   OFFLINE
ora.scgl2.vip  application    OFFLINE   OFFLINE

2. 解压升级文件

$ pwd
/backup/install/10205
unzip p8202632_10205_AIX64-5L_1of2.zip
unzip p8202632_10205_AIX64-5L_2of2.zip

3. 确保图像化正常启动
cd Disk1
$ export DISKPLAY=10.67.224.26:0.0

4. 启动升级
$ ./runInstaller

5. 开始图像界面升级 


6. 先开始CRS的升级,注意Patch路径选择$ORA_CRS_HOME
可以点击Installed Products按钮来查看Name与Path的对应关系


7. 点击Next


8. 完成环境检查,Next


9. 点击Install,开始真正的安装


10. 等待进度条满后,Next


11. 根据要求执行1. 2.两步操作


节点scgl1
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
#
# /u01/app/oracle/product/10.2.0/crs_1/install/root102.sh
Error : Please change the CRS_ORACLE_USER id <oracle> to have the following OS capabilities :
  < CAP_PROPAGATE CAP_BYPASS_RAC_VMM CAP_NUMA_ATTACH >
by running </usr/bin/chuser> command then 'crsctl stop crs' and 'crsctl start crs'.
The CSS daemon, ocssd.bin, will not run in realtime without  this change
Oracle strongly recommends that the CSS daemon run realtime
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /u01/app/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
Copying opriproc to /etc/oracle/bin for AIX
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
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.
Adding daemons to inittab
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
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: scgl1 scgl1_priv scgl1
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs


节点scgl2
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
#
# /u01/app/oracle/product/10.2.0/crs_1/install/root102.sh
Error : Please change the CRS_ORACLE_USER id <oracle> to have the following OS capabilities :
  < CAP_PROPAGATE CAP_BYPASS_RAC_VMM CAP_NUMA_ATTACH >
by running </usr/bin/chuser> command then 'crsctl stop crs' and 'crsctl start crs'.
The CSS daemon, ocssd.bin, will not run in realtime without  this change
Oracle strongly recommends that the CSS daemon run realtime
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /u01/app/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
Copying opriproc to /etc/oracle/bin for AIX
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
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.
Adding daemons to inittab
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
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: scgl2 scgl2_priv scgl2
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs

脚本执行结束后,crs及各项服务已经自动启动了

12. 验证版本信息

节点scgl1
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl query crs softwareversion scgl1
CRS software version on node [scgl1] is [10.2.0.5.0]

节点scgl2

# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl query crs softwareversion scgl2
CRS software version on node [scgl2] is [10.2.0.5.0]

节点scgl1
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

节点scgl2

# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

# su - oracle
$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.scgl1.gsd  application    ONLINE    ONLINE    scgl1
ora.scgl1.ons  application    ONLINE    ONLINE    scgl1
ora.scgl1.vip  application    ONLINE    ONLINE    scgl1
ora.scgl2.gsd  application    ONLINE    ONLINE    scgl2
ora.scgl2.ons  application    ONLINE    ONLINE    scgl2
ora.scgl2.vip  application    ONLINE    ONLINE    scgl2

到此位置集群软件的升级结束,由于篇幅图片编辑等限制数据库升级再下一篇博客中介绍。

0 0
原创粉丝点击