Oracle 11.2.0.1 升级到 11.2.0.3 示例


Oracle 11.2.0.1 单实例升级到11.2.0.3。 Oracle 升级的步骤都差不多。 先升级Oracle software,然后升级Oracle instance。

Oracle 11.2.0.2的patchset No 是:10098816。 关于该Patchset 的下载地址,参考下面的链接:

Oracle 11.2.0.2 Patch 说明

Oracle11.2.0.3 的Patchset no是:10404530,下载地址:

Oracle 11.2.0.3 Patchset 下载地址

patchset 有7个文件,关于这7个文件的不同作用,参考:

Oracle 11gR2 Patchset 不同文件作用说明

我们升级DB, 只需要其中的第一个和第二个文件。将2个文件解压缩,然后将第二个文件的内容copy到第一个文件的对应目录里。即将2个文件合成一个文件。 

 

一.查看DB 相关的信息

 

我们安装的是64位的DB。

 

[oracle@dave ~]$ sqlplus / as sysdba;

 

SQL*Plus: Release 11.2.0.1.0 Production onWed Sep 28 10:23:51 2011

 

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

 

 

Connected to:

Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Miningand Real Application Testing options

 

SQL> select name from v$database;

 

NAME

---------

ANQING

查看 Oracle 是32位还是64位的方法  

二.升级的相关说明

2.1 Patchset 的说明

这部分内容copy 自patchset的readme 文档。

Oracle Databasepatch set, release 11.2.0.3(11.2.0.2) is a full installation of the Oracle Database software. This meansthat you do not need to install Oracle Database 11g Release 2 (11.2.0.1)before installing Oracle Database 11g Release 2 (11.2.0.3/11.2.0.2).

Oracle 11.2.0.2 和 11.2.0.3 的patchset都是完整的安装包。所以可以直接用来安装。

Note the following changes with the newpatch set packaging:

(1)Newinstallations consist of installing the most recent patch set, rather thaninstalling a base release and then upgrading to a patch release.

(2)Directupgrades from previous releases to the most recent patch set are supported.

(3)Out-of-placepatch set upgrades recommended, in which you install the patch set into a new,separate Oracle home. In-place upgrades are supported, but not recommended.

2.1.1 In-Place Upgrade

This feature enablesyou to upgrade an existing installation of Oracle database to Oracle Database11g Release 2 (11.2.0.3) into the same Oracle home directory by replacingthe existing database files. The patch set application requires more downtimeand is not recommended. This upgrade type requires less disk space.

将升级文件安装到原来的Oracle home 目录,这样可以节省磁盘空间,但是需要更多的downtime。 这种并不推荐。

 

2.1.2 Out-of-Place Upgrade

This featureenables you to install Oracle Database 11g Release 2 (11.2.0.3) in a new,separate Oracle home directory. After the installation is complete, the datafrom the database in the old Oracle home directory is migrated to the databasein the new Oracle home directory.

可以将Oracle Database 安装的新的OracleHome directory,当安装结束后,旧的database 会迁移到新的Oracle homedirectory。

Out-of-placeupgrade process is similar to Oracle database upgrade from one version toanother and is the recommended type. The benefits of this upgrade type is thatthe patch set application requires much less downtime, and is safer when thepatch set application must be aborted. This upgrade type requires more diskspace to accommodate two Oracle home directories simultaneously.

这种方法是oracle推荐的方式,它可以降低downtime 时间,也相对更安全。但是这种方法需要2倍的地盘空间,不过对与现在白菜价硬盘来说,这点空间也不算什么了。 

2.2 升级步骤

Oracle 10g的Readme上有详细的升级步骤,但是11g的Readme上并没有详细的升级说明,需要参考官方文档。

Oracle 10g upgrade from10.2.0.1 to 10.2.0.4 见

(1)    备份数据库

(2)    运行patchset,升级oracle 软件

(3)    准备新的ORACLE_HOME

(4)    运行dbua 或者脚本升级实例

(5)    检查升级后的版本信息和无效对象

官网地址:

Upgrading to theNew Release

http://download.oracle.com/docs/cd/E11882_01/server.112/e23633/upgrade.htm#i1011372

我这里也是一个单实例的升级,相对较简单,如果是RAC的升级,估计还要费劲一点,11gR2RAC 升级后面会继续进行测试。

三.具体升级操作

3.1 备份DB

我这里是测试环境,就不进行备份,如果是生产环境,切记要先备份,后操作。

如果是In-Place Upgrade,同时备份一下整个ORACLE_HOME目录。 如果升级有问题,还可以还原回来。

重点是如下目录:

ORACLE_HOME/dbs

ORACLE_HOME/network/admin

ORACLE_HOME/hostname_dbname

ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_dbname

3.2 升级Oracle database 软件

运行Patchset 的runInstaller。

 

注意这里,我们选择第三个选项,skip software update,因为我们的patchset已经下载过了,如果选择第二个选项,会遇到如下错误,

  • 1
  • 2
  • 3
  • 4
  • 5
  • 下一页

相关内容