1. 讲补丁包上传到 oracle server ,解压、安装

[root@11g ~]#unzip p13390677_112040_Linux-x86-64_1of7.zip -d /tmp && unzip p13390677_112040_Linux-x86-64_2of7.zip -d /tmp

2. 检查当前版本
SQL> select * from v$version;

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

SQL> set linesize 150
SQL> set pagesize 9999
SQL> col comp_name format a40
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.1.0 VALID
OLAP Catalog 11.2.0.1.0 VALID
Spatial 11.2.0.1.0 VALID
Oracle Multimedia 11.2.0.1.0 VALID
Oracle XML Database 11.2.0.1.0 VALID
Oracle Text 11.2.0.1.0 VALID
Oracle Expression Filter 11.2.0.1.0 VALID
Oracle Rules Manager 11.2.0.1.0 VALID
Oracle Workspace Manager 11.2.0.1.0 VALID
Oracle Database Catalog Views 11.2.0.1.0 VALID
Oracle Database Packages and Types 11.2.0.1.0 VALID
JServer JAVA Virtual Machine 11.2.0.1.0 VALID
Oracle XDK 11.2.0.1.0 VALID
Oracle Database Java Packages 11.2.0.1.0 VALID
OLAP Analytic Workspace 11.2.0.1.0 VALID
Oracle OLAP API 11.2.0.1.0 VALID

18 rows selected.

3. 检查磁盘空间(system 必须要最少 10m)

SQL> 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_rate
from
(select tablespace_name,sum(bytes) /1024/1024 total_size
from dba_data_files
group by tablespace_name) a,
(select tablespace_name,sum(bytes)/1024/1024 free_size
from dba_free_space
group by tablespace_name) b
where 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 ORA
ORACLE_SID=orcl
ORACLE_BASE=/home/oracle/app
ORACLE_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

6.2 选择  skip software updates

6.3 选择 upgrade an existing database

6.4 选择语言

6.5 选择 enterprise edition

6.6  注意这里的安装位置,我之前的安装目录是11.2.0,我新目录是11.2.0.4 即将oracle 安装到其他位置,这样可以减少宕机时间,也是oracle 推荐的方法。

6.7 执行到76%的时候弹出如下窗口: 用 root 用户跑这个脚本

下面就是一个配置监听的过程

随后就是 会自动调用DBUA 来升级我们的实例(1---7步)

7. 修改环境变量

然后,再修改oracle用户的.bash_profile

ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1

然后source ~/.bash_profile

查看 cat /etc/oratab   【内容应该是新目录】

8. 登录查看,升级后版本

[oracle@11g ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 16 05:54:26 2015

Copyright (c) 1982, 2009, 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> set linesize 150
SQL> set pagesize 9999
SQL> col comp_name format a40
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

18 rows selected.

SQL> select count(*) from dba_objects where status<>'VALID';

COUNT(*)
----------
0

SQL> select * from utl_recomp_errors;

no rows selected

-- 最后修改 compatible 参数 ,切记这个参数已修改,此次升级操作就无法回退,一定要在应用经过测试之后修改。

SQL> show parameter comp

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offload_compaction string ADAPTIVE
compatible string 11.2.0
nls_comp string BINARY
plsql_v2_compatibility boolean FALSE

SQL> alter system set compatible='11.2.0.4.0' scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 671089544 bytes
Database Buffers 390070272 bytes
Redo Buffers 5517312 bytes
Database mounted.
Database opened.
SQL> show parameter comp

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offload_compaction string ADAPTIVE
compatible string 11.2.0.4.0
nls_comp string BINARY
plsql_v2_compatibility boolean FALSE

图形化升级单机oracle 11.2.0.1 到 11.2.0.4的更多相关文章

  1. 图形化升级单机oracle 11.2.0.4 到 12.2.0.1

    1. 讲补丁包上传到 Oracle server ,解压.安装 [oracle@11g tmp]$ unzip linuxx64_12201_database.zip 2. 检查当前版本 SQL> ...

  2. 升级_开阔视野之Oracle图形化升级(dbca建库后升级)—10.2.0.1.0升为10.2.0.5.0

    ***********************************************声明*************************************************** ...

  3. CentOS7 图形化方式安装 Oracle 18c 单实例

    下载 Oracle 数据库,zip 包 https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.h ...

  4. CentOS7 图形化方式安装Oracle 18c 安装配置

    下载 Oracle 数据库,zip 包 https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.h ...

  5. 图形化界面安装oracle报错Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.

    问题描述: 在Linux + oracle 安装时,采有root 帐号登录x-windows 界面,然后 $su oracle 登录录安装Oracle 报以下错误: >>> Coul ...

  6. git 学习小记之图形化界面客户端

    习惯了 Windows 的用户,一直不喜欢用类似命令行的东西来操作,当然我也不是不喜欢,只是操作太慢了.也许 Linux 大神在命令行的帮助下,办事效率翻倍,那也是非常常见的事情..当然我不是大神,所 ...

  7. 单机Oracle+asm(11.2.0.3.0) Patch Set Update(11.2.0.3.7 )

    之前写过一篇关于PSU升级的案例,参考如下: http://blog.csdn.net/jyjxs/article/details/8983880 但是,感觉有些地方理解的不是很透彻明白,照猫画虎的比 ...

  8. 单机 Oracle 11g(11.2.0.4)手动打补丁PSU(11.2.0.4.8)

    环境说明:database : 11.2.0.4 x64os: centos6.7 x64 准备内容:OPatch : p6880880_112000_Linux-x86-64.zipDB PSU : ...

  9. 转如何升级oracle版本?(11.2.0.1至11.2.0.4)

    dbua from 11.2,0.2 to 11.2.0.4 need 2hours 升级结果: 步骤名             日志文件名       状态 升级前操作   PreUpgrade.l ...

随机推荐

  1. SOCKIT 在make时出现(target pattern contains no % stop)???

    Make错误(***target pattern contains no % stop) 1.   问题描述 在按照SoC_SW_Lab_13.0.pdf操作时候出现了下列图片的错误 2.   Bsp ...

  2. 理解Linux系统负荷(WDCP系统后台参数之一)

    一.查看系统负荷 如果你的网站很卡,可能是因为服务器很慢,,你或许想查看一下,它的工作量是否太大了. 在Linux系统中,我们一般使用uptime命令查看(w命令和top命令也行).(另外,它们在苹果 ...

  3. chessy 提高篇系列 阅读笔记

    java提高篇(一)—–理解java的三大特性之封装 封装的好处, 汇聚属性和方法 减少修改对 其他处的影响 控制get和set方法. java提高篇(二)—–理解java的三大特性之继承 继承的好处 ...

  4. 02 redis通用命令操作

    set hi hello 设置值 get hi 获取值 keys * 查询出所有的key memcached 不能查询出所有的key keys *h 模糊查找key keys h[ie] 模糊查找 k ...

  5. java 发展简史

    [0]README 0.1) 本文转自 core java volume 1,仅供了解Java 的发展历史,它的前世今生,所谓知己知彼,百战不殆(just a joke) : [1]java 发展简史 ...

  6. hadoop 相关工具访问端口(转)

    原文:http://www.tuicool.com/articles/BB3eArJ hadoop系统部署时用到不少端口.有的是Web UI所使用的,有的是内部通信所使用的,有的是监控所使用的.实际系 ...

  7. mongodb.py

    from chatterbot.storage import StorageAdapter class Query(object): def __init__(self, query={}): sel ...

  8. IOS GameCenter验证登陆

    #import "GameKitHelper.h" #import "GameConstants.h" @interface GameKitHelper () ...

  9. struts2的分页标签

    1.准备tld文件 <?xml version="1.0" encoding="UTF-8" standalone="no"?> ...

  10. python书写日志的重要性?

    转自:https://blog.csdn.net/weixin_43063753/article/details/82899395 程序为什么要写日志?#为了能够在程序在运行过程中记录错误,方便维护, ...