RAC 11203升级至11204升级手册_第1页
RAC 11203升级至11204升级手册_第2页
RAC 11203升级至11204升级手册_第3页
RAC 11203升级至11204升级手册_第4页
RAC 11203升级至11204升级手册_第5页
已阅读5页,还剩46页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、OracleOracle 11g11g RACRAC 10.2.0.4(from10.2.0.4(from 11.2.0.3)11.2.0.3)升级手册升级手册 目录目录 第第 1 章章 升级前准备工作升级前准备工作.3 1.1 备份数据库.3 1.1.1 创建备份用目录.3 1.1.2 配置 TNS 文件.4 1.1.3 执行数据库备份.4 1.1.4 检查数据库备份情况.5 1.2 备份 OLR 机 OCR.5 1.3 停止ORACLE RAC.6 1.3.1 停止 ORACLE RAC.6 1.3.2 禁用自动启动 Oracle High Availability Services.9

2、1.4 备份 CRS 软件及 DB 软件 .9 1.4.1 检查备份目录.9 1.4.2 备份 OLR 及 OCR 备份文件.9 1.4.3 备份 GRID_HOME.9 1.4.4 备份 DATABASE_HOME.9 1.4.5 备份 Init 脚本.10 1.4.6 SCRBASE 备份 .10 1.4.7 备份 oraInventory 目录 .12 1.4.8 /opt/ORCLcluster .12 1.4.9 备份/usr/local/bin 目录.12 1.4.10 备份 asmlib(可选).12 1.4.11 /etc/oratab.12 1.4.12 其他备份.12 第第

3、 2 章章 升级升级 GI SOFTWARE.13 2.1 上传介质及解压文件.13 2.2 升级 CRS.13 2.3 升级后执行脚本.15 第第 3 章章 还原还原 CRS SOFTARE .17 3.1 停止两个节点上的 RAC 所有资源以及DAEMON.17 3.2 备份 10205CRS SOFTWARE.18 3.3 使用备份恢复 10204CRS SOFTWARE.19 3.3.1 还原 oraInventory .19 3.3.2 还原 CRS SOFTWARE.19 3.3.3 还原 OCR 注册信息.19 3.3.4 还原 inittab.19 3.3.5 还原守护进程及启

4、动文件.19 3.4 启动 ORACLE RAC 10.2.0.4.19 第第 4 章章 升级升级 CRS SOFTWARE .20 4.1.1 停止 ORACLE RAC 相关资源.20 4.1.2 禁用自动启动 CRS.22 4.2 升级 CRS.22 4.3 升级后执行脚本.25 第第 5 章章 升级升级 DB SOFTWARE.27 5.1 停止 ORACLE RAC 相关资源.27 5.2 升级 DB SOFTWARE.30 第第 6 章章 升级数据库升级数据库.34 6.1 备份 SPFILE.34 6.2 修改非集群模式并重启数据库.34 6.3 使用UPGRADE模式启动数据库

5、并执行升级前检查.34 6.4 执行升级脚本.36 6.5 启动数据库并编译无效对象.36 6.6 数据库修改为集群模式.39 第第 1 章章 升级前准备工作升级前准备工作 说明:本升级文档仅限于 redhat linux 环境下 11.2.0.3 升级至 11.2.0.4 1.1 备份数据库备份数据库 1.1.1 创建备份用目录创建备份用目录 rootxxfwb1 # mkdir /backups rootxxfwb1 # chown -R oracle:dba /backups rootxxfwb1 # chmod -R 777 /backups su - oracle cd /backu

6、ps mkdir rman 1.1.2 配置配置 TNS 文件文件 ds1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxfwb1-vip)(PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ds) (INSTANCE_NAME= ds1) ) ) ds2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxfwb2-vip)(PORT = 1521) (CONNECT_DATA = (SERVE

7、R = DEDICATED) (SERVICE_NAME = ds) (INSTANCE_NAME= ds2) ) ) test1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxfwb1-vip)(PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test) (INSTANCE_NAME= test1) ) ) test2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxfwb2-vip)(P

8、ORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test) (INSTANCE_NAME= test2) ) ) 1.1.3 执行数据库备份执行数据库备份 vi backup.sh # incremental database backup level 0 source /home/oracle/.bash_profile $ORACLE_HOME/bin/rman shutdown immediate 关闭关闭 GRID 相关服务相关服务 rootxxfwb1 bin# cd /u01/app/11.2.0/g

9、rid/bin xxfwb1,xxfwb2 rootxxfwb1 bin# ./crsctl stop cluster -n xxfwb1 CRS-2673: Attempting to stop ora.crsd on xxfwb1 CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on xxfwb1 CRS-2673: Attempting to stop ora.oc4j on xxfwb1 CRS-2673: Attempting to stop ora.LISTENER.lsnr on xx

10、fwb1 CRS-2673: Attempting to stop ora.cvu on xxfwb1 CRS-2673: Attempting to stop ora.LISTENER_SCAN1.lsnr on xxfwb1 CRS-2673: Attempting to stop ora.OCRVOT.dg on xxfwb1 CRS-2673: Attempting to stop ora.DATA.dg on xxfwb1 CRS-2677: Stop of ora.LISTENER.lsnr on xxfwb1 succeeded CRS-2673: Attempting to s

11、top ora.xxfwb1.vip on xxfwb1 CRS-2677: Stop of ora.LISTENER_SCAN1.lsnr on xxfwb1 succeeded CRS-2673: Attempting to stop ora.scan1.vip on xxfwb1 CRS-2677: Stop of ora.xxfwb1.vip on xxfwb1 succeeded CRS-2672: Attempting to start ora.xxfwb1.vip on xxfwb2 CRS-2677: Stop of ora.scan1.vip on xxfwb1 succee

12、ded CRS-2672: Attempting to start ora.scan1.vip on xxfwb2 CRS-2676: Start of ora.xxfwb1.vip on xxfwb2 succeeded CRS-2676: Start of ora.scan1.vip on xxfwb2 succeeded CRS-2672: Attempting to start ora.LISTENER_SCAN1.lsnr on xxfwb2 CRS-2677: Stop of ora.DATA.dg on xxfwb1 succeeded CRS-2676: Start of or

13、a.LISTENER_SCAN1.lsnr on xxfwb2 succeeded CRS-2677: Stop of ora.oc4j on xxfwb1 succeeded CRS-2672: Attempting to start ora.oc4j on xxfwb2 CRS-2677: Stop of ora.cvu on xxfwb1 succeeded CRS-2672: Attempting to start ora.cvu on xxfwb2 CRS-2676: Start of ora.cvu on xxfwb2 succeeded CRS-2676: Start of or

14、a.oc4j on xxfwb2 succeeded CRS-2677: Stop of ora.OCRVOT.dg on xxfwb1 succeeded CRS-2673: Attempting to stop ora.asm on xxfwb1 CRS-2677: Stop of ora.asm on xxfwb1 succeeded CRS-2673: Attempting to stop ora.ons on xxfwb1 CRS-2677: Stop of ora.ons on xxfwb1 succeeded CRS-2673: Attempting to stop work o

15、n xxfwb1 CRS-2677: Stop of work on xxfwb1 succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on xxfwb1 has completed CRS-2677: Stop of ora.crsd on xxfwb1 succeeded CRS-2673: Attempting to stop ora.ctssd on xxfwb1 CRS-2673: Attempting to stop ora.evmd on xxfwb1 CRS-2673: Attempt

16、ing to stop ora.asm on xxfwb1 CRS-2677: Stop of ora.evmd on xxfwb1 succeeded CRS-2677: Stop of ora.ctssd on xxfwb1 succeeded CRS-2677: Stop of ora.asm on xxfwb1 succeeded CRS-2673: Attempting to stop ora.cluster_interconnect.haip on xxfwb1 CRS-2677: Stop of ora.cluster_interconnect.haip on xxfwb1 su

17、cceeded CRS-2673: Attempting to stop ora.cssd on xxfwb1 CRS-2677: Stop of ora.cssd on xxfwb1 succeeded rootxxfwb2 bin# cd /u01/app/11.2.0/grid/bin xxfwb1,xxfwb2 rootxxfwb2 bin# ./crsctl stop cluster -n xxfwb2 。 。 。 。 。 。 。 。 停止停止 OHAS 服务服务 rootxxfwb1 bin# ps -ef|grep grid root 4786 12283 0 11:21 pts

18、/3 00:00:00 grep grid root 6643 1 0 Dec22 ? 00:29:29 /u01/app/11.2.0/grid/bin/ohasd.bin reboot grid 7829 1 0 Dec22 ? 00:17:40 /u01/app/11.2.0/grid/bin/oraagent.bin grid 7841 1 0 Dec22 ? 00:00:12 /u01/app/11.2.0/grid/bin/mdnsd.bin grid 7853 1 0 Dec22 ? 00:02:37 /u01/app/11.2.0/grid/bin/gpnpd.bin grid

19、 7873 1 0 Dec22 ? 00:10:19 /u01/app/11.2.0/grid/bin/gipcd.bin root 7995 1 0 Dec22 ? 00:20:45 /u01/app/11.2.0/grid/bin/orarootagent.bin root 8029 1 1 Dec22 ? 01:15:05 /u01/app/11.2.0/grid/bin/osysmond.bin root 8611 1 0 Dec22 ? 00:29:11 /u01/app/11.2.0/grid/bin/ologgerd -M -d /u01/app/11.2.0/grid/crf/

20、db/xxfwb1 rootxxfwb1 bin# ./crsctl stop crs -f CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on xxfwb1 CRS-2673: Attempting to stop ora.crf on xxfwb1 CRS-2673: Attempting to stop ora.mdnsd on xxfwb1 CRS-2677: Stop of ora.mdnsd on xxfwb1 succeeded CRS-2677: Stop o

21、f ora.crf on xxfwb1 succeeded CRS-2673: Attempting to stop ora.gipcd on xxfwb1 CRS-2677: Stop of ora.gipcd on xxfwb1 succeeded CRS-2673: Attempting to stop ora.gpnpd on xxfwb1 CRS-2677: Stop of ora.gpnpd on xxfwb1 succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on

22、 xxfwb1 has completed CRS-4133: Oracle High Availability Services has been stopped. rootxxfwb2 bin# ./crsctl stop crs -f rootxxfwb1 bin# ps -ef|grep grid root 4860 12283 0 11:24 pts/3 00:00:00 grep grid rootxxfwb1 bin# ps -ef|grep ohasd root 4865 12283 0 11:24 pts/3 00:00:00 grep ohasd root 6619 1 0

23、 Dec22 ? 00:00:00 /bin/sh /etc/init.d/init.ohasd run 1.3.2 禁用自动启动禁用自动启动 Oracle High Availability Services rootxxfwb1 bin# ./crsctl disable crs CRS-4621: Oracle High Availability Services autostart is disabled. rootxxfwb1 bin# ./crsctl config crs CRS-4621: Oracle High Availability Services autostart

24、is disabled. rootxxfwb2 bin# ./crsctl disable crs CRS-4621: Oracle High Availability Services autostart is disabled. rootxxfwb2 bin# ./crsctl config crs CRS-4621: Oracle High Availability Services autostart is disabled. 1.4 备份备份 CRS 软件及软件及 DB 软件软件 1.4.1 检查备份目录检查备份目录 #cd /backup #mkdir gridbak #mkdir

25、 orabak #cd orabak #mkdir oracle-basebak chmod 777 gridbak orabak 1.4.2 备份备份 OLR 及及 OCR 备份文件备份文件 说明:章节 1.2 使用 ocrconfig 命令做了相关文件的备份 OLR: rootxxfwb1 gridbak# cp -rp /u01/app/11.2.0/grid/cdata/xxfwb1/backup_.olr /backups/gridbak/ rootxxfwb1 gridbak# cp -rp /u01/app/11.2.0/grid/cdata/xxfwb1/backup_.olr

26、 /backups/gridbak/ OCR: cp -rp /u01/app/11.2.0/grid/cdata/xxfwb-cluster/*.ocr /backups/gridbak/ 1.4.3 备份备份 GRID_HOME rootxxfwb1 # cp -rp /u01/app/11.2.0/grid /backups/gridbak/ rootxxfwb1 # tar cpfz grid-nodea-.tgz grid rootxxfwb2 # cp -rp /u01/app/11.2.0/grid /backups/gridbak/ rootxxfwb1 # tar cpfz

27、grid-nodeb-.tgz grid 1.4.4 备份备份 DATABASE_HOME rootxxfwb1 gridbak# cp -rp /u01/app/oracle/product/11.2.0/db_1 /backups/orabak/ rootxxfwb1 orabak# cd /backups/orabak/ rootxxfwb1 orabak# tar cpfz db1-nodea-.tgz db_1 rootxxfwb2gridbak# cp -rp /u01/app/oracle/product/11.2.0/db_1 /backups/orabak/ rootxxfw

28、b2 # cd /backups/orabak/ rootxxfwb2 orabak# tar cpfz db1-nodeb-.tgz db_1 1.4.5 备份备份 GRID_BASE rootxxfwb1# cd /u01/app rootxxfwb1 # cp -rp grid /backups/gridbak/grid-basebak rootxxfwb2 # cd /u01/app rootxxfwb2 # cp -rp grid /backups/gridbak/grid-basebak 说明:卸载时,该目录下的诊断文件目录等会被自动清除,为了避免重新创建目录,这里做备份 1.4.

29、6 备份备份 DATABASE_BASE rootxxfwb1# cd /u01/app/oracle/ rootxxfwb1 # cp -rp admin cfgtoollogs diag /backups/gridbak/oracle-basebak/ rootxxfwb2 # cd /u01/app rootxxfwb2 # cp -rp admin cfgtoollogs diag /backups/gridbak/oracle-basebak/ 说明:卸载时,该目录下的诊断文件目录等会被自动清除,为了避免重新创建目录,这里做备份 1.4.7 备份备份 Init 脚本脚本 -ohasd

30、 rootxxfwb1 # cp -rp /etc/init.d/ohasd /backups/gridbak/ohasdbak rootxxfwb2 # cp -rp /etc/init.d/ohasd /backups/gridbak/ohasdbak -init.ohasd rootxxfwb1 # cp -rp /etc/init.d/init.ohasd /backups/gridbak/init.ohasdbak rootxxfwb2 # cp -rp /etc/init.d/init.ohasd /backups/gridbak/init.ohasdbak -inittab ro

31、otxxfwb1 # cp -rp /etc/inittab /backups/gridbak/inittabbak rootxxfwb2 # cp -rp /etc/inittab /backups/gridbak/inittabbak -在 RHEL 6 版本备份 oracle-ohasd.conf 或 oracle-tfa.conf rootxxfwb1 #cp -rp /etc/init/oracle-ohasd.conf /backups/gridbak/oracle-ohasd.confbak rootxxfwb2 #cp -rp /etc/init/oracle-ohasd.co

32、nf /backups/gridbak/oracle-ohasd.confbak oracle-ohasd.conf 文件内容如下: # Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. # # Oracle OHASD startup start on runlevel 35 stop on runlevel !35 respawn exec /etc/init.d/init.ohasd run /dev/null 2 SQL alter system set memory_target=

33、1536m scope=spfile; 2.2 预升级检查预升级检查 2.2.1 ORAchk 工具工具 #su - grid $unzip orachk.zip $chmod 755 orachk gridxxfwb1 gridorachk$ export RAT_CRS_HOME=/u01/app/11.2.0/grid gridxxfwb1 gridorachk$ ./orachk -u -o pre Enter upgrade target version (valid versions are 11.2.0.3.0, 11.2.0.4.0, 12.1.0.1.0, 12.1.0.2.

34、0 and 12.2.0.1.0):- 11.2.0.4.0 CRS stack is running and CRS_HOME is not set. Do you want to set CRS_HOME to /u01/app/11.2.0/grid?y/nyy Checking ssh user equivalency settings on all nodes in cluster Node xxfwb2 is configured for ssh user equivalency for grid user Searching for running databases . . .

35、 . . . . List of running databases registered in OCR 1. ds 2. None of above Select databases from list for checking best practices. For multiple databases, select 1 for All or comma separated number like 1,2 etc 1-21.1 . . You have run orachk as the clusterware software owner. orachk is intended to

36、be run as an RDBMS software owner (eg., oracle with ownership and group eg., oracle:oinstall). Please run orachk as an RDBMS software owner and with ownership as described above. rootxxfwb1 soft# chown -R oracle:oinstall gridorachk/ rootxxfwb1 soft# su - oracle oraclexxfwb1 gridorachk$ export RAT_CR

37、S_HOME=/u01/app/11.2.0/grid oraclexxfwb1 gridorachk$ ./orachk -u -o pre Detailed report (html) - /soft/gridorachk/orachk_xxfwb1_ds_/orachk_xxfwb1_ds_.html UPLOAD(if required) - /soft/gridorachk/orachk_xxfwb1_ds_.zip 将会生成一个健康检查报告,报告提出两个检查失败的配置: 1、官方升级文档也要求 OPatch 版本为 11.2.0.3.6 以上,由于此次安装为 OUT-PLACE 安

38、 装模式,这里忽略 2、asm_diskstring 设置为了/dev/*或空。该配置可能会导致 CRS hang。这里做修改为 /dev/raw/raw*,并使用 spfile 方式启动。如果采用该配置带来的 ora.cssd 无法启动等 BUG,报告里均有提示 2.3 ASM SPFILE 配置配置 说明: 1、 由于本机此前做过备份恢复,且没有备份 ASM SPFILE,采用了 pfile 方式启动了 asm 实例,这里要 进行修改和配置 2、 在做 SPFILE 配置发现,实际安装时均没有找到 MEMORY_TARGET 等配置。待寻找配置位置 -gpnptool 或 ocrdump

39、-local -xml gridxxfwb1 $ gpnptool get SPFile=+OCRVOT/xxfwb-cluster/asmparameterfile/registry.253. -没有找到启动的 pfile 文件,编辑一个新的 pfile 文件 *.asm_diskgroups=OCRVOT,DATA # Manual Mount *.asm_diskstring=/dev/raw/raw* *.large_pool_size = 12M *.instance_type=asm +ASM1.instance_number=1 +ASM2.instance_number=2 *.cluster_database=TRUE +ASM1.local_listener=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.85. 23.113)(PORT=1521) +ASM2.local_listener=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.85. 23.116)(PORT=1521) *.remote_l

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论