Oracle升级_oracle10g版本由10.2.0.1.0升级为10.2.0.4.0(即CPU升级)(六)

2014-11-24 12:27:40 · 作者: · 浏览: 1
/local/bin. Overwrite it (y/n)

[n]: y

Copyingoraenv to /usr/local/bin ...

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

[n]: y

Copyingcoraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file asneeded by

Database Configuration Assistant when a databaseis created

Finished running generic part of root.sh script.

Now product-specific root actions will beperformed.

\

至此,数据库软件升级完成。

3、 升级数据库

[root@rh55 ~]# su - oracle

[oracle@rh55 ~]$ !sql

sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.4.0 - Production on FriMay 16 09:57:40 2014

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

Connected to an idle instance.

SQL> startup upgrade; //以upgrade状态启库

ORACLE instance started.

Total System Global Area 729808896 bytes

Fixed Size 1269640 bytes

Variable Size 71303288 bytes

Database Buffers 654311424 bytes

Redo Buffers 2924544 bytes

Database mounted.

Database opened.

(1)升级数据字典

SQL> spool /home/oracle/cpu_up.log //把脚本信息录入到一个日志文件中

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

\

//如上图,数据库字典升级脚本运行完毕

//根据提示信息,下一步关库,之后正常启库,之后运行utlrp.sql脚本

SQL> spool off; //结束日志文件录入

SQL> shutdown immediate; //关库

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup //正常启动

ORACLE instance started.

Total System Global Area 729808896 bytes

Fixed Size 1269640 bytes

Variable Size 130023544 bytes

Database Buffers 595591168 bytes

Redo Buffers 2924544 bytes

Database mounted.

Database opened.

SQL> @ /rdbms/admin/utlrp.sql

//若在没有应用的情况下,运行这个脚本会比较快,约2分钟

\

//如上图,没有任何错误,数据库字典升级结束

(2)查看版本升级情况

SQL> select * from utl_recomp_errors; //检测组件升级情况

SQL> col comp_name for a30

SQL> set linesize 200

SQL> select comp_name,version,status from dba_registry;

//comp_name:组建名

\
SQL> show parametercomp
\

//compatible参数一旦被修改,数据库将无法进行回退,修改之前,一定确认所有应用在新版本上运行没有问题再去修改此参数

(3)修改兼容性参数

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

//确认应用运行无误后,修改参数compatible

至此,数据库已经由10.2.0.1.0升级为10.2.0.4.0。

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

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

原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处(http://blog.csdn.net/huangyanlong)。

表述有错误之处,请您留言,不胜感激。

提醒:点击目录,更有助于您的查看。

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