摘要:本文主要向大家介绍了Oracle数据库之图形化升级单机oracle 11.2.0.4 到 12.2.0.1,通过具体的内容向大家展现,希望对大家学习Oracle数据库有所帮助。
本文主要向大家介绍了Oracle数据库之图形化升级单机oracle 11.2.0.4 到 12.2.0.1,通过具体的内容向大家展现,希望对大家学习Oracle数据库有所帮助。
1. 讲补丁包上传到 Oracle server ,解压、安装
[oracle@11g tmp]$ unzip linuxx64_12201_database.zip
2. 检查当前版本
SQL> select * from v$version;
BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionPL/SQL Release 11.2.0.4.0 - ProductionCORE 11.2.0.4.0 ProductionTNS for Linux: Version 11.2.0.4.0 - ProductionNLSRTL Version 11.2.0.4.0 - Production
SQL> set linesize 150;set pagesize 9999;col comp_name format a40;SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;SQL> SQL> SQL>
COMP_NAME VERSION STATUS---------------------------------------- ------------------------------ ----------------------OWB 11.2.0.1.0 VALIDOracle Application Express 3.2.1.00.10 VALIDOracle Enterprise Manager 11.2.0.4.0 VALIDOLAP Catalog 11.2.0.4.0 VALIDSpatial 11.2.0.4.0 VALIDOracle Multimedia 11.2.0.4.0 VALIDOracle XML Database 11.2.0.4.0 VALIDOracle Text 11.2.0.4.0 VALIDOracle Expression Filter 11.2.0.4.0 VALIDOracle Rules Manager 11.2.0.4.0 VALIDOracle Workspace Manager 11.2.0.4.0 VALIDOracle Database Catalog Views 11.2.0.4.0 VALIDOracle Database Packages and Types 11.2.0.4.0 VALIDJServer JAVA Virtual Machine 11.2.0.4.0 VALIDOracle XDK 11.2.0.4.0 VALIDOracle Database Java Packages 11.2.0.4.0 VALIDOLAP Analytic Workspace 11.2.0.4.0 VALIDOracle OLAP API 11.2.0.4.0 VALID
18 rows selected.
3. 检查磁盘空间
select a.tablespace_name, round(a.total_size) "total_size(mb)",round(a.total_size) - round(b.free_size,3) "unsed_size(mb)",round(b.free_size,3) "free_size(mb)",round(b.free_size/total_size *100,2) ||‘%‘ free_ratefrom(select tablespace_name,sum(bytes) /1024/1024 total_sizefrom dba_data_filesgroup by tablespace_name) a,(select tablespace_name,sum(bytes)/1024/1024 free_sizefrom dba_free_spacegroup by tablespace_name) bwhere a.tablespace_name=b.tablespace_name(+);
4.为数据库做冷备份
RMAN>run {shutdown immediate;startup mount;allocate channel c1 type disk;allocate channel c2 type disk;backup full tag=‘db_full_bak‘ database format ‘/home/oracle/rmanbak/full_cold_%d_%s.bak‘;alter database open;}
RMAN> list backup;
数据库正常关闭后,还需要备份Oracle主目录,目的还是为了升级失败时,能够还原出数据库软件到升级前的版本。重点是如下目录:
ORACLE_HOME/dbs
ORACLE_HOME/network/admin
ORACLE_HOME/hostname_dbname
ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_dbname[oracle@11g ~]$ env|grep ORAORACLE_SID=orclORACLE_BASE=/home/oracle/appORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1[oracle@11g ~]$ tar cvf oracle.ora /home/oracle
5. 关闭数据库实例及相关进程 (静态监听、动态监听、EOM、相关服务)
--停止数据库外部进程[root@11g ~]#ps -ef|grep -v grep |grep LOCAL=NO|awk ‘{print $2}‘|xargs kill -9
SQL> shutdown immediate;[oracle@11g rmanbak]$ cat /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora[oracle@11g rmanbak]$ lsnrctl stop[oracle@11g rmanbak]$ lsnrctl status[oracle@11g rmanbak]$ ps -ef |grep ora_|grep -v grep[oracle@11g rmanbak]$ netstat -an |grep 1521[oracle@11g rmanbak]$ netstat -an |grep 1158
6. 开始升级操作[oracle@11g ~]$ cd /tmp/database[oracle@11g database]$ ./runInstaller
6.1 不勾选 , 点击 next
注意这里的安装位置,我之前的安装目录是11.2.0.4,我新目录是12.2.0.1.0 即将oracle 安装到其他位置,这样可以减少宕机时间,也是oracle 推荐的方法。
有pdksh或者ksh其中一个就行
[root@11g ~]# rpm -qa|grep kshpdksh-5.2.14-1.i386
执行到78%的时候弹出如下窗口: 用 root 用户跑这个脚本
进度到了83%的时候,自动弹出dbua窗口
本文由职坐标整理并发布,希望对同学们学习Oracle有所帮助,更多内容请关注职坐标数据库Oracle数据库频道!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号