***********************************************声明*********************************************************************** 

原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处,否则追究版权法律责任。

表述有错误之处。请您留言或邮件(hyldba@163.com)指明,不胜感激。

本文转载必须保留此处:http://blog.csdn.net/huangyanlong/article/details/39677103

深蓝的blog:http://blog.csdn.net/huangyanlong

****************************************************************************************************************************

前提:安装oracle软件后,完毕了dbca建库

目标:完毕oracle软件由10.2.0.1.0升级为10.2.0.5.0

1.查看数据库状态、版本号

[oracle@hyl ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 17 18:27:42 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS

---------------- --------------------

hyldb            OPEN

SQL> select comp_name,version,status from dba_registry;

2. 解压安装包

找到oracle10g的升级安装包,例如以下所看到的:

解压压缩包

[root@hyl soft]# unzip p8202632_10205_Linux-x86-64.zip

3. 关闭数据库

[oracle@hyl ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 29 10:23:51 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate;

--关库

Database closed.

Database dismounted.

ORACLE instance shut down.

[oracle@hyl ~]$ lsnrctl statuse

--核实监听已经停止

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-SEP-2014 10:30:51

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                29-SEP-2014 09:54:36

Uptime                    0 days 0 hr. 36 min. 14 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hyl)(PORT=1521)))

The listener supports no services

The command completed successfully

4. 数据备份

生产环境时此处须要做一次备份。以免升级失败时造成数据丢失,此文省略。

5. 升级oracle软件

远程调用图形化界面。例如以下图例:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

这里跳过需求包检查就可以,点击yes继续。例如以下图:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

[root@hyl ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh

--按提示运行脚本

Running Oracle 10g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin.  Overwrite it?

(y/n)

[n]: y

Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin.  Overwrite it?

(y/n)

[n]: y

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.sh script.

Now product-specific root actions will be performed.

运行脚本后,点击界面ok。进入到结束界面,例如以下:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

6. 升级数据库

[oracle@hyl ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.5.0 - Production on Mon Sep 29 11:05:28 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to an idle instance.

启动到upgrade状态

SQL> startup upgrade;

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  2094800 bytes

Variable Size              75499824 bytes

Database Buffers           83886080 bytes

Redo Buffers                6291456 bytes

Database mounted.

Database opened.

升级数据字典

SQL> spool /u01/app/oracle/update_log/cpu_up.log//把脚本信息录入到一个日志文件里

SQL> @?/rdbms/admin/catupgrd.sql       //開始跑脚本。升级数据字典。约10分钟

SQL> spool off;            
--结束日志文件

SQL> shutdown immediate;    --关库

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup                --正常启库

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  2094800 bytes

Variable Size             150997296 bytes

Database Buffers            8388608 bytes

Redo Buffers                6291456 bytes

Database mounted.

Database opened.

SQL> @?/rdbms/admin/utlrp.sql     --运行该脚本

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

SQL> select * from utl_recomp_errors;

SQL> col comp_name for a30

SQL> col status for a20

SQL> col VERSION for a10

SQL> set linesize 200

SQL> select comp_name,version,status from dba_registry;

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

SQL> show parameter comp

改动兼容性

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

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

至此。数据库完毕由10.2.0.1.0升级到10.2.0.5.0版本号。

7. 完毕

[oracle@hyl ~]$ sqlplus '/as sysdba'

--登陆数据库

SQL*Plus: Release 10.2.0.5.0 - Production on Mon Sep 29 11:57:49 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

小结

对照dbca建库前后进行cpu升级的过程,会发现明显的差别:

1、未进行dbca建库,仅仅需进行软件升级,升级后建库就可以;

2、dbca建库后(即存在数据库的情况下),升级软件后。须要升级数据字典,改动兼容性。

简而记之

cpu升级(10.2.0.1.0-10.2.0.5.0)

条件

操作

兴许

不存在库

升级软件

兴许建库

存在库

升级软件+数据字典+兼容性

完毕升级后直接訪问库

***********************************************声明*********************************************************************** 

原创作品,出自 “深蓝的blog” 博客。欢迎转载,转载时请务必注明出处,否则追究版权法律责任。

表述有错误之处,请您留言或邮件(hyldba@163.com)指明,不胜感激。

本文转载必须保留此处:http://blog.csdn.net/huangyanlong/article/details/39677103

深蓝的blog:http://blog.csdn.net/huangyanlong

****************************************************************************************************************************

升级_开阔视野之Oracle图形化升级(dbca建库后升级)—10.2.0.1.0升为10.2.0.5.0的更多相关文章

  1. oracle linux 6.5 安装 oracle 12cR2数据库(2)-DBCA建库

    援引:http://www.cnblogs.com/kerrycode/p/3386917.html  by 潇湘隐者 Oracle 12C引入了CDB与PDB的新特性,在ORACLE 12C数据库引 ...

  2. 升级_宽视野Oracle图形升级(升级后dbca建库)—10.2.0.1.0提拔10.2.0.5.0

    ***********************************************声明**********************************************  原创作 ...

  3. VMware下安装Linux系统,ORACLE软件,DBCA建库

    操作系统安装   在vmware下安装Linux (OEL5.6),用于数据库服务器 1.打开vmware,选择"创建新的虚拟机"       2.选择自定义安装   3.选择虚拟 ...

  4. Oracle RAC集群搭建(末篇)--dbca建库

    一,环境配置检测 当前位置oracle用户 二,dbca建库 运行命令dbca 根据实际情况配置 等待完成 本次内容教程完成 查看IP信息

  5. 数据库--oracle图形化管理工具和新增自定义用户

    oracle数据库图形化管理工具: 1 navicat工具很小,操作mySQL和SQLServer非常好用,但对于oracle体验性就有点差,要自己下载编码和替换oci文件.下面是解决的方法教程链接 ...

  6. 因xhost命令和DISPLAY环境变量操作不当导致无法启动Oracle图形化安装界面

    在redhat操作系统上安装Oracle 11.1时,遇到在执行runInstaller后无法启动安装图像化界面,甚是郁闷. 问题现象: 使用Xmanager2.0软件登陆AIX桌面,root用户可以 ...

  7. CENTOS 6.4 安装oracle 10g,手工建库及升级到10.2.0.5

    一. 数据库软件安装 参照官方手册 1.安装rpm包 注这里的yum直接用163的yum yum -y install binutils compat-libstdc++-33 compat-libs ...

  8. oracle 12C利用dbca建库13步

    oracle用户登录然后命令行执行:dbca 如果没有此命令可以用:find / -name "dbca"查到后执行. 1.选择Create a database 2.选择Adva ...

  9. Oracle安装部署之命令建库

    1.建目录: [oracle@wen ~]$ mkdir $ORACLE_BASE/admin/rezin/{a,b,c,dp}dump -p [oracle@wen ~]$ mkdir $ORACL ...

随机推荐

  1. VS2013 打开项目时提示This project is incompatible with the current edition Visual Studio.

    刚安装完成了Visual Studio 2013后,打开项目时,遇到以下问题 解决方法:在Visual Studio 2013 的菜单中打开“Tools",并打开“Extensions an ...

  2. 最短路-Floyd

    简介: 算法的特点:  弗洛伊德算法是解决任意两点间的最短路径的一种算法,可以正确处理有向图或有向图或负权(但不可存在负权回路)的最短路径问题,同时也被用于计算有向图的传递闭 包. 算法思想: 通过F ...

  3. Noip2015提高组解题报告

    Day1 T1神奇的幻方 一道简单异常的小模拟,我们只需要确定数字1的位置,然后根据题意枚举即可,简简单单就A了,什么也不卡. 然而这题,我刚开始学OI的时候,因为当时比较蠢,被这题花式吊打啊.... ...

  4. 将Electron桌面应用转化为Win10的UWP应用

    如果有小伙伴不知道如何打包Electron桌面应用的,请戳我. 微软提供了一款快捷工具:electron-windows-store,用于将electron桌面应用打包成Windows10系统上.ap ...

  5. [BZOJ1494]生成树计数

    [BZOJ1494] [NOI2007]生成树计数 Description 最近,小栋在无向连通图的生成树个数计算方面有了惊人的进展,他发现:·n个结点的环的生成树个数为n.·n个结点的完全图的生成树 ...

  6. BZOJ 3809 Gty的二逼妹子序列(莫队+分块)

    [题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=3809 [题目大意] 给定一个长度为n(1<=n<=100000)的正整数序 ...

  7. BZOJ 1098 [POI2007]办公楼biu(反向图bfs+并查集优化)

    [题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=1098 [题目大意] 现在有一张图,要求将这张图的点划分为尽量多的分组,对于不同分组的两 ...

  8. 【二项式定理】【推导】计蒜客17115 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B. Coin

    题意:投一枚硬币向上的概率是q/p.问你投K枚硬币,向上的枚数为偶数枚的概率是? 要求的即为. 这个东西是个二项展开式的偶数项系数和,来,我们复习一下高中数学,设f(x)=(ax+b)^n,则其偶数项 ...

  9. 【欧拉回路】【欧拉路径】【Fleury算法】CDOJ1634 记得小苹初见,两重心字罗衣

    Fleury算法看这里 http://hihocoder.com/problemset/problem/1181 把每个点看成边,每个横纵坐标看成一个点,得到一个无向图. 如果新图中每个点的度都是偶数 ...

  10. python的dict和set

    dict dict是dictionary的缩写,python内置了字典,在其他语言中也称为map,使用键值对储存,具有极快的查找速度. 如果是只用list来实现,就需要两个list,先在第一个list ...