版本升级步骤:
1.升级到11.2.0.4和12.1.0.2不需要关闭oracle数据库和监听(12.1.0.2过程中执行完root.sh脚本后需要关闭监听)
2.下载升级包并解压,执行runInstall开始进行升级数据库软件,期间不要关闭netca窗口,会自动带出DBUA窗口
3.修改bash_profile并source下,修改oratab文件,重启监听,sqlplus / as sysdba就发现升级成功了
升级的注意事项
最好先备份一下
升级过程如果出现失败,不会影响原有版本,如果catupgrd.sql或DBUA窗口过程出现异常,影响很严重,startup的会提示需要upgrade
升级成功后,参数信息不变、file_name路径等不变
? 主数据库发布号 – Major Database Release Number
? 数据库维护发布号 – Database Maintanence Release Number
? 应用服务器发布号 – Application Server Release Number
? 组建相关发布号 – Component Specific Release Number
? 平台相关发布号 – Platform Specific Release Number
我们用oracle补丁包升级后,第4位和第5位数字会有所改变,其中第4位是补丁集号(path set),第5位是补丁集更新号(path set update,PSU)。
升级分两种
1. PSU升级(含打单个补丁和打一堆补丁集两种概念)
2. 版本升级(含小版本和大版本升级两种概念)
PSU升级:
使用Opatch 命令(比如说从10.2.0.5.0 升级到10.2.0.5.12),一般PSU中有Readme 参照Readme即可。
PSU: Patch Set Updates。PSU就是更新一堆的补丁,所以用Opatch来操作,opatch也可以打单个的补丁
Oracle对于其产品每个季度发行一次的补丁包,包含了bug的修复。Oracle选取被用户下载数量多的,并且被验证过具有较低风险的补丁放入到每个季度的PSU中。在每个PSU中不但包含Bug的修复而且还包含了最新的CPU。每个数据库版本都有自己的PSU,PSU版本号体现在数据库版本的最后一位,比如最新的10.2.0.5的PSU是10.2.0.5.3,而11.2.0.2的最新PSU则是11.2.0.2.2。有些PSU是可以直接安装的,而有些PSU则必须要求安装了上一 个版本的PSU之后才能继续安装。比如对于10.2.0.4版本的数据库来说,PSU 10.2.0.4.4可以直接安装在最原始的10.2.0.4.0版本中,而最新的PSU 10.2.0.4.8则必须要求先安装10.2.0.4.4。
通常安装PSU是比较简单的,步骤如下:
1.安装PSU需要使用到opatch,在README.html中有描述该PSU需要的最低版本opatch,如果当前opatch版本过低,则需要先下载 Patch 6880880,该Patch中包含最新的opatch,只需要解压覆盖原先的$ORACLE_HOME/OPatch目录即可。查看当前的opatch版本,可以使用opatch version命令。
$ORACLE_HOME/OPatch/opatch version
2.安装PSU,请仔细阅读README.html,确认安装命令,通常是简单的opatch apply。
$ORACLE_HOME/OPatch/opatch apply #在PSU文件目录中用opatch apply应用补丁
3.更新数据库,将修改过的SQL文件应用到数据库中。
SQL> STARTUP
SQL>@$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply
如果打某个补丁1618213,但是没有找到单个的补丁包,找到了多个PSU,如在MOS上找到两个这样的包Database 11.2.0.1 PSU Patch 18139690、Database 11.2.0.1.2 PSU Patch 18031668,我们只打后一个就可以了,因为PSU是从小到大相互包含的累计补丁包
版本升级:
11G开始的版本升级patchset都是完整的安装包,可以直接用来安装
小版本升级:如从oracle 11.2.0.1.0升级到11.2.0.4.0
大版本升级:如从11.1.0.1.0 升级到11.2.0.4.0
版本升级步骤:
1.关闭oracle数据库和监听
2.下载升级包并解压,执行runInstall开始进行升级数据库软件
3.升级完数据库软件启动监听使用dbua命令升级数据库
版本升级的两种方法:
1.将升级文件安装到原来的Oracle home目录,这样可以节省磁盘空间,但是需要更多的停机时间,这种方法Oracle并不推荐。
In-Place Upgrade
This feature enables you to upgrade an existing installation of Oracle database to Oracle Database 11gRelease 2 (11.2.0.3) into the same Oracle home directory by replacing the existing database files. The patch set application requires more downtime and is not recommended. This upgrade type requires less disk space.
Note:
If you select In-place upgrade to upgrade Oracle database to the latest version, then you must:
Review "Optionally Performing an In-Place Upgrade (Into the Same Oracle Home)" inOracle Database Upgrade Guide.
Take a complete backup of your Oracle home directory before you perform. the upgrade.
2.将Oracle Database安装的新的OracleHome目录,当安装结束后,旧的database会迁移到新的Oracle HOME目录。这种方法是oracle推荐的方式,它可以降低停机时间,也相对更安全。但是这种方法需要至少两倍的磁盘空间。
Out-of-Place Upgrade
This feature enables you to install Oracle Database 11gRelease 2 (11.2.0.3) in
a new, separate Oracle home directory. After the installation is complete, the
data from the database in the old Oracle home directory is migrated to the
database in the new Oracle home directory.
Out-of-place upgrade process is similar to Oracle database upgrade from one
version to another and is the recommended type. The benefits of this upgrade
type is that the patch set application requires much less downtime, and is
safer when the patch set application must be aborted. This upgrade type
requires more disk space to accommodate two Oracle home directories
simultaneously.
11.2.0.3 版本升级patchset是完整的安装包的说明
Patch Set Overview
Oracle Database patch set, release 11.2.0.3 is a full installation of the Oracle Database software. This means that you do not need to install Oracle Database 11gRelease 2 (11.2.0.1) before installing Oracle Database 11gRelease 2 (11.2.0.3).
See Also:
"Oracle Database 11gRelease 2 (11.2.0.3) New Features" inOracle Database New Features Guide
Note the following changes with the new patch set packaging:
New installations consist of installing the most recent patch set, rather than installing a base release and then upgrading to a patch release.
Direct upgrades from previous releases to the most recent patch set are supported.
Out-of-place patch set upgrades recommended, in which you install the patch set into a new, separate Oracle home. In-place upgrades are supported, but not recommended.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30126024/viewspace-2123323/ ,如需转载,请注明出处,否则将追究法律责任。