设为首页 收藏本站
查看: 513|回复: 0

[经验分享] Oracle图形化升级(dbca建库后升级)—10.2.0.1.0升为10.2.0.5.0

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2014-9-30 09:03:41 | 显示全部楼层 |阅读模式
前提:安装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;
SouthEast.jpg
2. 解压安装包找到oracle10g的升级安装包,如下所示:
SouthEast.jpg
解压压缩包
[iyunv@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软件远程调用图形化界面,如下图例:
SouthEast.jpg
SouthEast.jpg
SouthEast.jpg
SouthEast.jpg
SouthEast.jpg
SouthEast.jpg
这里跳过需求包检查即可,点击yes继续,如下图:
SouthEast.jpg
SouthEast.jpg
SouthEast.jpg
SouthEast.jpg
[iyunv@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,进入到结束界面,如下:
SouthEast.jpg
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分钟
SouthEast.jpg
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     --执行该脚本
SouthEast.jpg
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;
SouthEast.jpg
SQL> show parameter comp
SouthEast.jpg
修改兼容性
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)
条件
操作
后续
存在库
升级软件
后续建库
不存在库
升级软件+数据字典+兼容性
完成升级直接访问库


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-25585-1-1.html 上篇帖子: Oracle图形化升级(升级后dbca建库)—10.2.0.1.0升为10.2.0.5.0 下篇帖子: 详解Oracle中 DELETE、TRUNCATE 和 DROP 的区别 Oracle
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表