重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3019|回复: 1
打印 上一主题 下一主题

[补丁] 怎么安装oracle热补丁

[复制链接]
跳转到指定楼层
楼主
发表于 2016-1-14 11:40:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
OPatch - How are Online Patches Installed?OPatch is the recommended (Oracle-supplied) tool that customers are supposed to use in order to apply or rollback patches. It maintains an inventory of patches, and ensures that two conflicting patches are not simultaneously installed. OPatch was recently modified to support online patches, which means that it can apply/rollback online patches, as well as detect conflicts between any two kinds of patches. As such, it is not necessary for customers to execute the "oradebug patch" commands; OPatch does this.

All OPatch versions after 11.1.0.6 are Online Patch aware.

The syntax to install an Online Patch is:
opatch apply online -connectString <SID>:<USERNAME>:<PASSWORD>:<NODE>

example:
$ opatch apply online -connectString db11202:sys:oracle -invPtrLoc /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
Invoking OPatch 11.2.0.1.4

Oracle Interim Patch Installer version 11.2.0.1.4
Copyright (c) 2010, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.1.4
OUI version : 11.2.0.2.0
OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2011-01-27_16-14-21PM.log

Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt


The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
ApplySession applying interim patch '10188727' to OH '/u01/app/oracle/product/11.2.0/dbhome_1'

Running prerequisite checks...
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '10188727' for restore. This might take a while...
Backing up files affected by the patch '10188727' for rollback. This might take a while...

Patching component oracle.rdbms, 11.2.0.2.0...
The patch will be installed on active database instances.
Installing and enabling the online patch 'bug10188727.pch', on database 'db11202'.

ApplySession adding interim patch '10188727' to inventory

Verifying the update...
Inventory check OK: Patch ID 10188727 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 10188727 are present in Oracle Home.

OPatch succeeded.


For RAC you can list all of the instances:
opatch apply online -connectString <SID>:<USERNAME>:<PASSWORD>:<NODE1>,<SID2>:<USERNAME>:<PASSWORD>:<NODE2>,...


The USERNAME and PASSWORD are those of a user that has SYSDBA privileges.
The USERNAME and PASSWORD can be left blank if the OS user applying the patch has the SYSDBA privilege.
To apply a patch only to local in the RAC environment, it is necessary to use '-local'.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2016-1-14 11:41:49 | 只看该作者
The syntax to install an Online Patch is:
opatch apply online -connectString <SID>:<USERNAME>:<PASSWORD>:<NODE>

注意,这里的username名为数据库里面的sysdba用户。不是操作系统用户。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-12-1 19:52 , Processed in 0.088727 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表