停止监听
[oracle@rhel64 ~]$ lsnrctl stop
关闭数据库
[oracle@rhel64 ~]$ sqlplus / as sysdba
SYS@NKYYDB>shutdown immediate;
上传软件包并解压
[root@rhel64 ~]# mkdir /u01/upgrade
[root@rhel64 ~]# chown -R oracle:oinstall /u01/upgrade/
[oracle@rhel64 upgrade]$ unzip p13390677_112040_Linux-x86-64_1of7.zip
[oracle@rhel64 upgrade]$ unzip p13390677_112040_Linux-x86-64_2of7.zip
[root@rhel64 upgrade]# chmod -R 775 database/
安装数据库软件
配置临时环境变量调用图形界面
[oracle@rhel64 database]$ export DISPLAY=192.168.119.1:0.0
[oracle@rhel64 database]$ ./runInstaller
1、这里将“我希望通过 My Oracle Support 接收安全更新”前的对勾去掉,点击“下一步”;
2、选择“跳过软件更新”;
3、选择“升级现有的数据库”;
4、选择产品语言“简体中文”和“英文”;
5、选择数据库版本“企业版”;
6、指定安装位置,Oracle基目录不变,软件位置将红框内的改为11.2.0.4(原本应该为11.2.0);
7、操作员组可选为“dba”或者不填;
8、选择“全部忽略”,然后“下一步”;
9、安装到76%的时候,会弹出“执行配置脚本”;
10、在root用户下执行上述复制的脚本语句,回车,会提示“请输入本地二进制目录的完整路径名:[/usr/local/bin]”,我们将ORACLE_HOME的路径复制并加上bin(/u01/app/oracle/product/11.2.0.4/dbhome_1/bin),然后继续回车;
[root@rhel64 ~]# /u01/app/oracle/product/11.2.0.4/dbhome_1/root.sh
执行完点击ok
配置监听
1、点击“下一步”;
2、监听程序名默认为LISTENER,“下一步”;
3、默认配置,“下一步”;
4、选择“使用标准端口号1521”,然后“下一步”;
5、选择“否”,然后“下一步”;
6、监听程序配置完成,点击“下一步”;
7、是否配置其他命名方法,选择“否”,然后“下一步”;
8、Oracle Net 配置完毕,点击“完成”;
升级数据库
1、点击“下一步”;
2、选择我们需要进行升级的数据库,点击“下一步”;
3、会弹出警告信息,查看警告信息,如果没有特别的问题可以忽略,点击“yes”
4、 在升级结束后重新编译无效对象选择“√”,并行度默认,其他的均可以不选择,如果没有备份过数据库,可以选择,然后“下一步”;
5、选择“升级过程中不移动数据库文件”,然后“下一步”;
6、默认内容,然后“下一步”;
7、检查概要信息无误后,点击“完成”;
8、整个升级过程大概会持续半小时,需要耐心等待;
更改oracle用户下环境变量
[oracle@rhel64 ~]$ vi ~/.bash_profile
编辑环境变量,将红色箭头指向原内容改为11.2.0.4,然后使环境变量生效
[oracle@rhel64 ~]$ source .bash_profile
检查数据库版本与监听状态
[oracle@rhel64 ~]$ lsnrctl status
[oracle@rhel64 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 22-SEP-2024 18:55:05
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel64)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 22-SEP-2024 17:47:39
Uptime 0 days 1 hr. 7 min. 25 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/rhel64/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel64)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "NKYYDB" has 1 instance(s).
Instance "NKYYDB", status READY, has 1 handler(s) for this service...
Service "NKYYDBXDB" has 1 instance(s).
Instance "NKYYDB", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rhel64 ~]$
[oracle@rhel64 ~]$ sqlplus / as sysdba
SQL> select * from v$version;
[oracle@rhel64 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Sep 22 18:56:28 2024
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
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
SQL>