ORACLE 11g从 11.2.0.1升级到11.2.0.4 详细实战教程

 1、准备安装

查看当前oracle版本,确定是比较旧的11.2.0.1

[oracle@hch_test_121_90 ~]$ rlwrap sqlplus / as sysdba 
sql*plus: release 11.2.0.1.0 production on fri mar 17 15:20:45 2017 
copyright (c) 1982, 2009, oracle. all rights reserved. 
connected to: 
oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit production 
with the partitioning, olap, data mining and real application testing options 
sql> exit 
disconnected from oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit production 
with the partitioning, olap, data mining and real application testing options 
[oracle@hch_test_121_90 ~]$ 

上传11.2.0.4的安装包p13390677_112040_linux-x86-64_1of7.zip、p13390677_112040_linux-x86-64_2of7.zip到服务器上。oracle11.2.0.4的安装包下载,请查阅我的blog地址,这上面有下载源:http://blog.csdn.net/mchdba/article/details/51418063

 升级准备:

解压缩: 
[oracle@hch_test_121_90 oracle]$ unzip p13390677_112040_linux-x86-64_1of7.zip 
[oracle@hch_test_121_90 oracle]$ unzip p13390677_112040_linux-x86-64_2of7.zip 
打开启动图像界面 
[oracle@hch_test_121_90 oracle]$ cd database/ 
[oracle@hch_test_121_90 database]$ ./runinstaller 
starting oracle universal installer... 
checking temp space: must be greater than 120 mb. actual 6024 mb passed 
checking swap space: must be greater than 150 mb. actual 1798 mb passed 
checking monitor: must be configured to display at least 256 colors. actual 16777216 passed 
preparing to launch oracle universal installer from /tmp/orainstall2017-03-17_03-11-29pm. please wait ...[oracle@hch_test_121_90 database]$ 
[oracle@hch_test_121_90 database]$ 

2、开始升级

c:\pic\oracle\100.png,填写邮箱地址(也可以忽略不填写),然后下一步

选择忽略软件升级,下一步吗,如101.png

然后选择升级,如下102.png

然后继续进行,有个ins-35373错误,选择yes,如下

 

 然后选择好语言种类,简体中文、繁体中文、英语、美式英语等,如104.png所示:

继续下一步,选择企业版,如

接下来,开始选择oracle目录了,是选择新建的目录呢还是选择原来的老版本11.2.0.1的目录呢?这里最好选择一个新的目录,因为万一升级失败了,老的oracle版本软件目录没有被覆盖掉,还可以继续使用的,否则升级失败,就基本只有彻底暴力清除所有文件以及注册信息,之后重新安装oracle了。

我这里就选择一个新的目录11.2.0.4的目录,如106.png、107.png所示 

接下来,继续,选择新的的inventory directory目录,默认的会报错,如108.png所示

 

接下来选择用户组和操作组,如109.png所示:

 

 接下来,会有checking各种lib包,一些比较偏的,缺少了也没事,直接ignore忽略掉就ok,如110.png所示:

 下一步看安装的目录以及基本信息,如111.png所示:

然后点击“”install“”按钮,开始安装,如图112.png

 中级需要执行配置脚本,如图112_1.png

重新打开xshell,ssh连接到数据库,在命令行去执行命令:

[root@hch_test_121_90 oracle]# bash -x/oracle/app/orainventory11.2.0.4/orainstroot.sh
[root@hch_test_121_90 oracle]# bash -x/oracle/app/oracle/product/11.2.0.4/dbhome_1/root.sh

执行过程如下: 

[root@hch_test_121_90 oracle]# bash -x /oracle/app/orainventory11.2.0.4/orainstroot.sh 
+ awk=/bin/awk 
+ chmod=/bin/chmod 
+ chgrp=/bin/chgrp 
+ cp=/bin/cp 
+ echo=/bin/echo 
+ mkdir=/bin/mkdir 
++ /usr/bin/id 
++ /bin/awk '-f(' '{print $1}' 
++ /bin/awk -f= '{print $2}' 
+ ruid=0 
+ '[' 0 '!=' 0 ']' 
+ '[' -d /etc ']' 
+ /bin/chmod 755 /etc 
+ '[' -f /oracle/app/orainventory11.2.0.4/orainst.loc ']' 
+ /bin/cp /oracle/app/orainventory11.2.0.4/orainst.loc /etc/orainst.loc 
+ /bin/chmod 644 /etc/orainst.loc 
+ /bin/echo 'changing permissions of /oracle/app/orainventory11.2.0.4. 
adding read,write permissions for group. 
removing read,write,execute permissions for world. 
' 
changing permissions of /oracle/app/orainventory11.2.0.4. 
adding read,write permissions for group. 
removing read,write,execute permissions for world. 
+ /bin/chmod -r g+rw,o-rwx /oracle/app/orainventory11.2.0.4 
+ '[' 0 '!=' 0 ']' 
+ /bin/echo 'changing groupname of /oracle/app/orainventory11.2.0.4 to oinstall.' 
changing groupname of /oracle/app/orainventory11.2.0.4 to oinstall. 
+ /bin/chgrp -r oinstall /oracle/app/orainventory11.2.0.4 
+ '[' 0 '!=' 0 ']' 
+ /bin/echo 'the execution of the script is complete.' 
the execution of the script is complete. 
[root@hch_test_121_90 oracle]# 
[root@hch_test_121_90 oracle]# 
[root@hch_test_121_90 ~]# sh /oracle/app/oracle/product/11.2.0.4/dbhome_1/root.sh 
performing root user operation for oracle 11g 
the following environment variables are set as: 
 oracle_owner= oracle 
 oracle_home= /oracle/app/oracle/product/11.2.0.4/dbhome_1 
enter the full pathname of the local bin directory: [/usr/local/bin]: /oracle/app/oracle/product/11.2.0.4/dbhome_1/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@hch_test_121_90 ~]# 

之后回到vnc远程的窗口,点击界面的ok,会提示安装oracle net configuration assistant: welcome操作:

接下来会配置网络,如下113.png、114.png

 

设置sys密码,如115.png所示

看到这里,问题来了,中间没有数据库让你选择去升级,问题在哪里呢,在/etc/oratab没有配置,所以赶紧去配置:

[root@hch_test_121_90 ~]# more /etc/oratab 
# 
# this file is used by oracle utilities. it is created by root.sh 
# and updated by either database configuration assistant while creating 
# a database or asm configuration assistant while creating asm instance. 
# a colon, ':', is used as the field terminator. a new line terminates 
# the entry. lines beginning with a pound sign, '#', are comments. 
# 
# entries are of the form: 
# $oracle_sid:$oracle_home:<n|y>: 
# 
# the first and second fields are the system identifier and home 
# directory of the database respectively. the third filed indicates 
# to the dbstart utility that the database should , "y", or should not, 
# "n", be brought up at system boot time. 
# 
# multiple entries with the same $oracle_sid are not allowed. 
# 
powerdes:/hom/oracle/app/oracle/product/11.2.0/dbhome_1:y 
[root@hch_test_121_90 ~]# 

配置完后,前面的步骤重新来一遍,到此就会有下面的出现的database选择项让我们选择,如116.png、117.png、118.png所示:

接下来,选择升级时区以及备份数据库,如119.png所示:

选择升级过程中不移动数据文件,如图120.png

选择默认的闪回恢复区以及恢复区大小,也可以自己手动调整,如121.png

 接下来默认下一步,准备企业管理器,当然也可以选择不需要的,直接忽略掉,如下图122.png

 接下来,点击“finish”按钮(这个时间会比较长,至少1个小时吧,我这里用了1.5个小时,可能在ssd上时间比较短),如图123.png、124.png、125.png所示

ok,等待进度条变成100%,然后基本的升级就好了,就完成了,后续记得修改.bash_profile里面的oracle_home目录为新的11.2.0.4目录即可。

以上所述是www.887551.com给大家介绍的oracle 11g从 11.2.0.1升级到11.2.0.4 详细实战教程,希望对大家有所帮助

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐