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

2014-11-24 14:22:58 · 作者: · 浏览: 1
'/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 --执行该脚本

\

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;

\

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

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