码迷,mamicode.com
首页 > 数据库 > 详细

示例Oracle 10.2.0.1.0升级到10.2.0.4.0一例

时间:2015-01-16 12:41:48      阅读:294      评论:0      收藏:0      [点我收藏+]

标签:

1.查看当前系统版本

[oracle@std Disk1]$ sqlplus /as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 15 16:21:40 2015

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0    Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

 

以通过以下命令查看数据库位数

[oracle@std Disk1]$ file $ORACLE_HOME/bin/oracle
/u02/app/product/10.2.0/db_1/bin/oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

 

2.升级前请仔细阅读升级文档

在此我们把升级包p6810189_10204_Linux-x86.zip上传到数据库服务器 并执行 unzip p6810189_10204_Linux-x86.zip

注意:升级之前备份数据

 

3.停掉ORACLE所有服务

[oracle@std Disk1]$ sqlplus /as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 15 16:26:53 2015

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@std Disk1]$ lsnrctl stop
[oracle@std Disk1]$ isqlplusctl stop
[oracle@std Disk1]$ emctl stop dbconsole

 

4.执行升级程序包

 

[oracle@std Disk1]$ ./runInstaller 
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1, asianux-2 or asianux-3
                                      Failed <<<<

Exiting Oracle Universal Installer, log for this session can be found at /u02/oraInventory/logs/installActions2015-01-15_04-34-21PM.log


对上面的问题   http://blog.csdn.net/huashnag/article/details/8528829

 

调出图形界面升级界面:

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

 

以root身份执行脚本:

[root@std ~]# /u02/app/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u02/app/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.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user root, privgrp root..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab 
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
    std
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

技术分享

 

5.执行升级后续脚本

[oracle@std Disk1]$ sqlplus /as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jan 16 10:31:02 2015

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

Connected to an idle instance.

SQL> startup upgrade
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size            1268896 bytes
Variable Size          163578720 bytes
Database Buffers      436207616 bytes
Redo Buffers            7118848 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/catupgrd.sql 
。。。。。。。。。。。。。。。。。。。。。。

执行完脚本正常关闭数据库重启查看版本:

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size                  1268896 bytes
Variable Size             197133152 bytes
Database Buffers          402653184 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0    Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> show parameter compati    

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      10.2.0.1.0
plsql_v2_compatibility               boolean     FALSE

SQL> alter system set compatible=10.2.0.4.0 scope=spfile;
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size                  1268896 bytes
Variable Size             197133152 bytes
Database Buffers          402653184 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
SQL> show parameter compat

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      10.2.0.4.0
plsql_v2_compatibility               boolean     FALSE

 

升级的一个总过程顺序:

技术分享

 

示例Oracle 10.2.0.1.0升级到10.2.0.4.0一例

标签:

原文地址:http://www.cnblogs.com/myrunning/p/4228113.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!