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,下载地址:
patchset 有7个文件,关于这7个文件的不同作用,参考:
Oracle 11gR2 Patchset 不同文件作用说明
我们升级DB, 只需要其中的第一个和第二个文件。将2个文件解压缩,然后将第二个文件的内容copy到第一个文件的对应目录里。即将2个文件合成一个文件。
我们安装的是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 -
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).
(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.
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.
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.
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 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 升级后面会继续进行测试。
我这里是测试环境,就不进行备份,如果是生产环境,切记要先备份,后操作。
如果是In-Place Upgrade,同时备份一下整个ORACLE_HOME目录。 如果升级有问题,还可以还原回来。
重点是如下目录:
ORACLE_HOME/dbs
ORACLE_HOME/network/admin
ORACLE_HOME/hostname_dbname
ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_dbname
运行Patchset 的runInstaller。
注意这里,我们选择第三个选项,skip software update,因为我们的patchset已经下载过了,如果选择第二个选项,会遇到如下错误,