Oracle Rac11.2.0.1升级11.2.0.4

本文链接:https://blog.csdn.net/qq_22917163/article/details/82701140

rac11.2.0.1升级至11.2.0.4需要p13390677_112040_Linux-x86-64_1of7.zip、p13390677_112040_Linux-x86-64_2of7.zip、p13390677_112040_Linux-x86-64_3of7.zip这3个安装包(1、2是oracle安装包,3是grid安装包)

RAC环境

 

节点1

节点2

主机名

wlrac01

wlrac02

SID

wlracdb1

wlracdb2

DB_NAME

wlracdb

 

RAC当前版本

11.2.0.1

 

操作系统

Red Hat Enterprise Linux Server release 6.8 (Santiago)

 

ORACLE_HOME

/u01/app/oracle/product/11.2.0/db_1

 

GRID_HOME

/u01/app/11.2.0/grid

 

备份两实例下的oracle_base,以便出问题后恢复

tar zcvf ora11.tar.gz /u01/app

1. 创建新版本所需目录(所有节点)

[root@wlrac01 ~]# mkdir -p /u01/app/oracle/product/11.2.0.4/db_1

[root@wlrac01 ~]# chown -R oracle:oinstall /u01/app/oracle/product/11.2.0.4

[root@wlrac01 ~]# mkdir -p /u01/app/11.2.0.4/grid

[root@wlrac01 ~]# chown -R grid:oinstall /u01/app/11.2.0.4

2. 执行安装前预检查

[grid@wlrac01 grid]$ ./runcluvfy.sh stage -pre crsinst -upgrade -n wlrac01,wlrac02 -rolling -src_crshome /u01/app/11.2.0/grid -dest_crshome /u01/app/11.2.0.4/grid -dest_version 11.2.0.4.0 -fixup -fixupdir /tmp -verbose

命令输出:

....省略

正在检查 Oracle 集群表决磁盘配置…

“ASM 运行”检查通过。ASM 正在所有指定节点上运行

Oracle 集群表决磁盘配置检查已通过

集群件版本一致性测试已通过

attention:其中最可能报错的地方是缺少9413827或9706490补丁程序,安装其中一个就可,附上安装9413827补丁程序链接https://blog.csdn.net/qq_22917163/article/details/82697782

打完补丁后,在重新执行预检测命令,通过后就可以执行安装程序了。

3. Grid Infrastructure升级(在一个节点执行就行,会自动拷贝到其他节点)

Oracle建议使用滚动升级模式,该模式不用停止crs

节点1上执行

将p13390677_112040_Linux-x86-64_3of7.zip解压到gird用户家目录

[root@wlrac01 ~]# su - grid

[grid@wlrac01 ~]$ unset ORACLE_HOME

[grid@wlrac01 ~]$ unset ORACLE_BASE

[grid@wlrac01 ~]$ unset ORACLE_SID

[grid@wlrac01 ~]$ export LANG=en_US

[grid@wlrac01 ~]$ cd grid

[grid@wlrac01 grid]$ ./runInstaller

attention:由于文章是升级完后整理的,所以图片是后来找的,图片里边的一些内容可能不对,大家参照自己原有环境配置

3.1 选择跳过软件更新

 

3.2 选择“升级Oracle Grid Infrastructure或Oracle自动存储管理”

 

3.3 选择语言

 

3.4 选择所有rac节点,点击next

 

3.5 配置ASM对应组

 

3.6 制定新gird软件安装位置,参考上边新建目录(/u01/app/11.2.0.4/grid)

 

3.7 再次进行检查,如一些不必要的检查报错可以选择ignore(例如缺少i386包等)

 

3.8 执行安装过程

执行到最后一步,按照提示在所有节点依次执行脚本

[root@wlrac01 src]# cd /u01/app/11.2.0.4/grid/

[root@wlrac01 grid]# ./rootupgrade.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0.4/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of
“dbhome” have not changed. No need to overwrite.
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
Copying oraenv to /usr/local/bin …
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
Copying coraenv to /usr/local/bin …

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/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer

ASM 升级已在第一个节点上开始。

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘wlrac01’
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.CRS.dg’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.DATA.dg’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.FRA.dg’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN1.lsnr’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.wlrac01.vip’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.wlrac01.vip’ on ‘wlrac01’ succeeded
CRS-2672: Attempting to start ‘ora.wlrac01.vip’ on ‘wlrac02’
CRS-2677: Stop of ‘ora.LISTENER_SCAN1.lsnr’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.scan1.vip’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.scan1.vip’ on ‘wlrac01’ succeeded
CRS-2672: Attempting to start ‘ora.scan1.vip’ on ‘wlrac02’
CRS-2676: Start of ‘ora.scan1.vip’ on ‘wlrac02’ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN1.lsnr’ on ‘wlrac02’
CRS-2676: Start of ‘ora.wlrac01.vip’ on ‘wlrac02’ succeeded
CRS-2676: Start of ‘ora.LISTENER_SCAN1.lsnr’ on ‘wlrac02’ succeeded
CRS-2677: Stop of ‘ora.CRS.dg’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.DATA.dg’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.FRA.dg’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.asm’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.asm’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.eons’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.ons’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.ons’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.net1.network’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.net1.network’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.eons’ on ‘wlrac01’ succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘wlrac01’ has completed
CRS-2677: Stop of ‘ora.crsd’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.asm’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.gpnpd’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.evmd’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.ctssd’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.asm’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.cssd’ on ‘wlrac01’ succeeded
CRS-2673: Attempting to stop ‘ora.diskmon’ on ‘wlrac01’
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘wlrac01’
CRS-2677: Stop of ‘ora.gipcd’ on ‘wlrac01’ succeeded
CRS-2677: Stop of ‘ora.diskmon’ on ‘wlrac01’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘wlrac01’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
OLR initialization - successful
Replacing Clusterware entries in upstart
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

节点2输出比节点一多:

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.0

ASM 升级已在最后一个节点上完成。

Configure Oracle Grid Infrastructure for a Cluster … succeeded

3.9 修改所有节点grid用户的bash_profile文件,将ORACLE_HOME改为ORACLE_HOME=/u01/app/11.2.0.4/grid

[grid@wlrac01 ~]$ source .bash_profile

3.10 重新启动crs(在一个节点执行即可)

[root@wlrac01 ~]# cd /u01/app/11.2.0.4/grid/bin/

[root@wlrac01 bin]# ./crsctl stop cluster -all

[root@wlrac01 bin]# ./crsctl start cluster -all

3.11 验证Grid是否升级成功

[root@wlrac01 bin]# ./crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [11.2.0.4.0]

[root@wlrac01 bin]# ./crsctl query crs releaseversion

Oracle High Availability Services release version on the local node is [11.2.0.4.0]

[root@wlrac01 bin]# ./crsctl query crs softwareversion

Oracle Clusterware version on node [wlrac01] is [11.2.0.4.0]

4 RDBMS升级(在一个节点执行即可)

4.1 数据库软件升级

将p13390677_112040_Linux-x86-64_1of7.zip、p13390677_112040_Linux-x86-64_2of7.zip解压到oracle用户家目录

[root@wlrac01 bin]# su - oracle

[oracle@wlrac01 ~]$ unset ORACLE_HOME

[oracle@wlrac01 ~]$ unset ORACLE_BASE

[oracle@wlrac01 ~]$ unset ORACLE_SID

[oracle@wlrac01 ~]$ export LANG=en_US

[oracle@wlrac01 ~]$ cd database

[oracle@wlrac01 database]$ ./runInstaller

运行runInstaller进行升级,在出现“指定住目录详细信息”窗口,选择新ORACLE_HOME(/u01/app/oracle/product/11.2.0.4/db_1),其它都点下一步

4.2 数据库升级(图片来自网络,仅供参考)

升级完数据库软件后,会自动弹出数据库升级窗口(如果没有,可以使用dbua进行升级)

 

至此,数据库软件升级完成,数据库升级完成

4.3 数据库升级验证

SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;

COMP_NAME VERSION STATUS


OWB 11.2.0.1.0 VALID

Oracle Application Express 3.2.1.00.10 VALID

Oracle Enterprise Manager 11.2.0.4.0 VALID

OLAP Catalog 11.2.0.4.0 VALID

Spatial 11.2.0.4.0 VALID

Oracle Multimedia 11.2.0.4.0 VALID

Oracle XML Database 11.2.0.4.0 VALID

Oracle Text 11.2.0.4.0 VALID

Oracle Expression Filter 11.2.0.4.0 VALID

Oracle Rules Manager 11.2.0.4.0 VALID

Oracle Workspace Manager 11.2.0.4.0 VALID

Oracle Database Catalog Views 11.2.0.4.0 VALID

Oracle Database Packages and Types 11.2.0.4.0 VALID

JServer JAVA Virtual Machine 11.2.0.4.0 VALID

Oracle XDK 11.2.0.4.0 VALID

Oracle Database Java Packages 11.2.0.4.0 VALID

OLAP Analytic Workspace 11.2.0.4.0 VALID

Oracle OLAP API 11.2.0.4.0 VALID

Oracle Real Application Clusters 11.2.0.4.0 VALID

19 rows selected.


SQL> select * from v$version;

BANNER


Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

验证成功,数据库由11.2.0.1.0升至11.2.0.4.0

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值