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

2014-11-24 14:22:58 · 作者: · 浏览: 2

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

原创作品,出自 “深蓝的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软件

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

\

\

\

\

\

\

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

\

\

\

\

[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,进入到结束界面,如下:

\

6. 升级数据库

[oracle@hyl ~]$ sqlplus