oracle 11.2.0.3RAC升级到11.2.0.4

  • 一、GRID集群软件升级
  • 二、Oracle数据库软件升级
    • 注意

照着大佬的教程一步一步做的 ,升级完看也挺简单,可能会出现一些突发状况,这个就是要多做,多积累经验。

一、GRID集群软件升级

准备11.2.0.4集群安装包:
p13390677_112040_Linux-x86-64_3of7.zip

解压,运行./runInstaller





这里/u01/11.2.0/grid_11204目录要提前建好并给 grid:oinstall权限






到这一步需要在两个节点分别执行此脚本,节点一执行完再执行节点二
脚本运行内容如下:

节点一
[root@zydb1 ~]# /u01/11.2.0/grid_11204/rootupgrade.sh
Performing root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME=  /u01/11.2.0/grid_11204Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/11.2.0/grid_11204/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File AnalyzerASM upgrade has started on first node.CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zydb1'
CRS-2673: Attempting to stop 'ora.crsd' on 'zydb1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'zydb1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'zydb1'
CRS-2673: Attempting to stop 'ora.OCRDG.dg' on 'zydb1'
CRS-2673: Attempting to stop 'ora.orcl.db' on 'zydb1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.zydb1.vip' on 'zydb1'
CRS-2677: Stop of 'ora.zydb1.vip' on 'zydb1' succeeded
CRS-2672: Attempting to start 'ora.zydb1.vip' on 'zydb2'
CRS-2677: Stop of 'ora.orcl.db' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.ARCHDG.dg' on 'zydb1'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'zydb1'
CRS-2676: Start of 'ora.zydb1.vip' on 'zydb2' succeeded
CRS-2677: Stop of 'ora.DATADG.dg' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.ARCHDG.dg' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.OCRDG.dg' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'zydb1'
CRS-2677: Stop of 'ora.asm' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'zydb1'
CRS-2677: Stop of 'ora.ons' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'zydb1'
CRS-2677: Stop of 'ora.net1.network' on 'zydb1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'zydb1' has completed
CRS-2677: Stop of 'ora.crsd' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'zydb1'
CRS-2673: Attempting to stop 'ora.crf' on 'zydb1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'zydb1'
CRS-2673: Attempting to stop 'ora.evmd' on 'zydb1'
CRS-2673: Attempting to stop 'ora.asm' on 'zydb1'
CRS-2677: Stop of 'ora.evmd' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.crf' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.asm' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'zydb1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'zydb1'
CRS-2677: Stop of 'ora.cssd' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'zydb1'
CRS-2677: Stop of 'ora.gipcd' on 'zydb1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'zydb1'
CRS-2677: Stop of 'ora.gpnpd' on 'zydb1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zydb1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
OLR initialization - successful
Replacing Clusterware entries in inittab
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configure Oracle Grid Infrastructure for a Cluster ... succeeded节点二
[root@zydb2 ~]# /u01/11.2.0/grid_11204/rootupgrade.sh
Performing root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME=  /u01/11.2.0/grid_11204Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/11.2.0/grid_11204/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zydb2'
CRS-2673: Attempting to stop 'ora.crsd' on 'zydb2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'zydb2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'zydb2'
CRS-2673: Attempting to stop 'ora.cvu' on 'zydb2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'zydb2'
CRS-2673: Attempting to stop 'ora.OCRDG.dg' on 'zydb2'
CRS-2673: Attempting to stop 'ora.orcl.db' on 'zydb2'
CRS-2677: Stop of 'ora.cvu' on 'zydb2' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'zydb1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'zydb2'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.zydb2.vip' on 'zydb2'
CRS-2676: Start of 'ora.cvu' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'zydb2' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'zydb1'
CRS-2677: Stop of 'ora.zydb2.vip' on 'zydb2' succeeded
CRS-2672: Attempting to start 'ora.zydb2.vip' on 'zydb1'
CRS-2677: Stop of 'ora.orcl.db' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.ARCHDG.dg' on 'zydb2'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'zydb2'
CRS-2677: Stop of 'ora.ARCHDG.dg' on 'zydb2' succeeded
CRS-2677: Stop of 'ora.DATADG.dg' on 'zydb2' succeeded
CRS-2676: Start of 'ora.zydb2.vip' on 'zydb1' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'zydb1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'zydb1'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'zydb1' succeeded
CRS-2677: Stop of 'ora.OCRDG.dg' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'zydb2'
CRS-2677: Stop of 'ora.asm' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'zydb2'
CRS-2677: Stop of 'ora.ons' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'zydb2'
CRS-2677: Stop of 'ora.net1.network' on 'zydb2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'zydb2' has completed
CRS-2677: Stop of 'ora.crsd' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'zydb2'
CRS-2673: Attempting to stop 'ora.evmd' on 'zydb2'
CRS-2673: Attempting to stop 'ora.asm' on 'zydb2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'zydb2'
CRS-2677: Stop of 'ora.evmd' on 'zydb2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'zydb2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'zydb2' succeeded
CRS-2677: Stop of 'ora.asm' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'zydb2'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'zydb2'
CRS-2677: Stop of 'ora.cssd' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'zydb2'
CRS-2677: Stop of 'ora.crf' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'zydb2'
CRS-2677: Stop of 'ora.gipcd' on 'zydb2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'zydb2'
CRS-2677: Stop of 'ora.gpnpd' on 'zydb2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zydb2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
OLR initialization - successful
Replacing Clusterware entries in inittab
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
Started to upgrade the CSS.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Successfully upgraded the Oracle Clusterware.
Oracle Clusterware operating version was successfully set to 11.2.0.4.0ASM upgrade has finished on last node.Configure Oracle Grid Infrastructure for a Cluster ... succeeded

升级完grid记得修改一下环境变量

修改grid用户环境变量$ORACLE_HOME改为新grid路径
[grid@zydb1 ~]$ cat .bash_profile
# .bash_profile# Get the aliases and functions
if [ -f ~/.bashrc ]; then. ~/.bashrc
fi# User specific environment and startup programsPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/11.2.0/grid_11204
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export LANG=en_US
export PATH

查询一下grid版本

[grid@zydb2 ~]$  crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.4.0]

二、Oracle数据库软件升级

准备11.2.0.4oracle安装包:
p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
解压后执行./runInstaller即可开始升级。

[oracle@zydb1 ~]$ unset ORACLE_HOME
[oracle@zydb1 ~]$ unset ORACLE_SID
[oracle@zydb1 ~]$ unset ORACLE_BASE
[oracle@zydb1 ~]$ env |grep ORACLE

开始之前把环境变量unset一下






/u01/app/oracle/product/11.2.0/db_11204目录要提前建好并给oracle:oinstall权限

[root@zydb1 ~]# mkdir /u01/app/oracle/product/11.2.0/db_11204
[root@zydb1 ~]# chown oracle:oinstall /u01/app/oracle/product/11.2.0/db_11204[root@zydb2 ~]# mkdir /u01/app/oracle/product/11.2.0/db_11204
[root@zydb2 ~]# chown oracle:oinstall /u01/app/oracle/product/11.2.0/db_11204







脚本执行输出如下:

节点一
[root@zydb1 11.2.0.4]# /u01/app/oracle/product/11.2.0/db_11204/root.sh
Performing root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_11204Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
---------------------
节点二
[root@zydb2 ~]# /u01/app/oracle/product/11.2.0/db_11204/root.sh
Performing root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_11204Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

分别在节点一和节点二执行此脚本,执行完脚本后DBUA会自动弹出











我这装了个 EM体验一下。

记得修改oracle用户环境变量

升级前
[oracle@zydb1 ~]$ cat .bash_profile
# .bash_profile# Get the aliases and functions
if [ -f ~/.bashrc ]; then. ~/.bashrc
fi# User specific environment and startup programsPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH
export ORACLE_SID=orcl1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export GRID_HOME=/u01/11.2.0/grid
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH:$HOME/bin
export LANG=en_US升级后
[oracle@zydb1 ~]$ cat .bash_profile
# .bash_profile# Get the aliases and functions
if [ -f ~/.bashrc ]; then. ~/.bashrc
fi# User specific environment and startup programsPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH
export ORACLE_SID=orcl1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_11204
export GRID_HOME=/u01/11.2.0/grid_11204
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH:$HOME/bin
export LANG=en_US

查看两个节点数据库版本

[oracle@zydb1 ~]$ sqlplus -vSQL*Plus: Release 11.2.0.4.0 Production[oracle@zydb2 ~]$ sqlplus -vSQL*Plus: Release 11.2.0.4.0 Production

注意

这里升级grid就相当于重新在一个新目录安装了一个新的grid,所以升级grid过程中还是会遇到和初次安装grid一样的报错:在执行/u01/11.2.0/grid/root.sh时会报错ohasd failed to start。在升级grid执行/u01/11.2.0/grid_11204/rootupgrade.sh时也会遇到相同报错,所以在执行升级脚本时在出现Replacing Clusterware entries in inittab时也要执行下面命令才能顺利升级grid,两个节点都要,不然升级会失败,至于升级失败后是否能重新执行脚本还没有验证过。

/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

同理,下面这个文件也要更新一下相关行不然升级成功后重启服务器后集群会起不来。

vi /etc/init.d/ohasd
if [ -r $AUTOSTARTFILE ]thencase `$CAT $AUTOSTARTFILE` inenable*)$LOGERR "Oracle HA daemon is enabled for autostart." --/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1 &my_crsctl start has -nowait--sleep 600--ps -ef | grep dd| grep hasd|awk '{print $2}'|xargs kill -9;;

oracle 11.2.0.3RAC升级到11.2.0.4相关推荐

  1. Oracle 10g(10.2.0.4)升级到10.2.0.5.19

    一.将数据库版本从10.2.0.4 升级到 10.2.0.5,再升级到10.2.0.5.19 (1) 备份等过程略过,一个老库的升级过程,记录之.   (2) 一致性关闭数据库及监听 sqlplus ...

  2. windows 2003 下oracle从10.2.0.1升级到10.2.0.4

    方法一: 1. 完全安装10.2.0.1 2. 安装完成后,停止所有的oracle服务,可以通过停止oracle 的window services或者使用以下命令来实现. emctl stop dbc ...

  3. oracle 10.2.0.1升级到10.2.0.4

    --********************************* -- Oracle 10.2.0.1 升级到 10.2.0.4 --****************************** ...

  4. oracle 10.2.0.4 rac emca,Oracle RAC 10.2.0.1升级到10.2.0.4-安装配置参考手册

    数据库RAC版本升级方案 一.概述 数据库做版本升级,版本从oracle10g 10.2.0.1 升级到oracle10g10.2.0.4. 本次操作因为涉及到生产数据库系统,须停止生产服务应用,所以 ...

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

    之前安装的是两个节点的RAC 平台. 数据库版本是10.2.0.1. 这个实验的目的就是将这个数据库版本从10.2.0.1 升级到 10.2.0.4.  升级包可以从Oracle metalink上进 ...

  6. 从oracle10g 10.2.0.1 升级到10.2.0.4碰到的问题及解决

    这两天做数据库的升级,从10.2.0.1升级到10.2.0.4,升级安装很顺利,但安装完成后再用常用用户连接数据库,出现如下提示错误: ORA-12514:TNS:监听程序当前无法识别连接描述符中请求 ...

  7. 64位Windows2003 Enterprise sp2 上64位Oracle10.2.0.1升级到Oracle10.2.0.3具体步骤

    64位Windows2003 Enterprise sp2 上64位Oracle10.2.0.1升级到Oracle10.2.0.3具体步骤 错误描述:64位的Oracle10.2.0.1版本在64位W ...

  8. Oracle 11.2.0.1 升级到 11.2.0.3 示例

    Oracle 11.2.0.1 单实例升级到11.2.0.3. Oracle 升级的步骤都差不多. 先升级Oracle software,然后升级Oracle instance. Oracle 11. ...

  9. oracle升级12.2,Oracle 11.2.0.4升级到12.2.0.1

    操作系统版本: [oracle@D2-LZY245 ~]$ cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 数据库版本: SQ ...

最新文章

  1. mvc5 ef6 mysql_[实战]MVC5+EF6+MySql企业网盘实战(17)——思考2
  2. 恒生证券期货行业用户维稳工作指引(一)
  3. 腾讯校招历年经典面试汇总:C++研发岗
  4. sqlserver的登陆操作
  5. 大数据学习笔记12:搭建伪分布式Spark
  6. 区分两种题目类型中的数学期望
  7. ListView 条目加载上滑下滑首尾缩放动画实现
  8. 怎样教育孩子,能让孩子有更好的学习?
  9. sharepoint安装心得-.net与sharepoint安装 sharepoint安装心得_过程(一)
  10. 2021美赛总结(假)。预祝大家获得满意的成绩!
  11. kali linux修改dns,Kali Linux 设置动/静态IP地址以及修改DNS
  12. java七牛云工具类_您应该知道的7个Java工具
  13. SPI驱动SX1278模块1-网关.SPI头文件,c文件,sx1278头文件和c文件,主函数
  14. 「教师资格证定期注册」相关答疑
  15. moviepy音视频剪辑:颜色相关变换函数blackwhite、colorx、fadein/out、gamma_corr、invert_colors、lum_contrast、mask_color介绍
  16. [更新ing]sklearn(十六):Nearest Neighbors *
  17. 如何动态使用烘焙出来的ReflectionProbe-0.exr信息
  18. SQLMAP插件tamper编写与使用
  19. 思科交换机基础--11三层交换机ACL配置
  20. 小程序地图标记点自定义标签的实现

热门文章

  1. 虽说是递推式,但我还是觉得是逆推法
  2. mysql mmm配置_从零开始配置 MySQL MMM
  3. 场景构图你知道多少?
  4. C++添加防火墙例外——检测目标程序不在例外列表时才进行添加,防止重复添加
  5. 销售人员如何打电话?
  6. 怎么上传ftp服务器文件,ftp服务器如何上传本地文件
  7. 计算机中的速率、带宽、时延、利用率解读
  8. 解决:RuntimeError: CUDA out of memory. Tried to allocate 64.00 MiB (GPU 0; 4.00 GiB total capacity; 2
  9. IDEA中下方git的提交记录上有黄、绿、紫色标记的意思
  10. 《Python金融大数据风控建模实战》 第6章 变量分箱方法