网站首页
JSP空间
动态资讯
开源项目
技术文档
资源下载
J2EE资源
客户论坛
在线支付
 
  技术文档>>数据库技术>>Oracle技术>>Oracle开发>查看文档  
  教你快速掌握如何使用"opatch"打补丁     
  文章作者:未知  文章来源:赛迪网技术社区  
  查看:109次  录入:管理员--2008-03-10  
 

在实际的工作和学习中,很多人都会发现有些patch没有setup安装程序,本文中我们将详细的介绍如何使用oracle的opatch工具来进行安装。

1、下载

opatch的最新版本可以从metalink下载,参考 note:224346.1

(opatch - where can i find the latest version of opatch?)

2、准备工作

# you must have perl 5.00503 (or later)

# installed under the oracle_home, or elsewhere within the host

# environment. opatch is no longer included in patches as of 9.2.0.2.

# refer to the following link for details on perl and opatch:

# http://metalink.oracle.com/metalink/plsql/ml2_documents.showdocument?p_database_id=not&p_id=189489.1

下载optach后,上传到$oracle_home

[/app/oracle/product/9205/opatch]$chmod 755 *

[/app/oracle/product/9205/opatch]$ opatch version

invoking opatch 10.2.0.1.6

opatch version: 10.2.0.1.6

opatch succeeded.

[/app/oracle/product/9205/opatch]$ opatch lsinventory

invoking opatch 10.2.0.1.6

oracle interim patch installer version 10.2.0.1.6

copyright (c) 2007, oracle corporation. all rights reserved.

oracle home : /app/oracle/product/9205

central inventory : /app/oracle/orainventory

from : /var/opt/oracle/orainst.loc

opatch version : 10.2.0.1.6

oui version : 10.1.0.5.0

oui location : /app/oracle/product/9205/oui

log file location : /app/oracle/product/9205/cfgtoollogs/opatch/opatch2008-02-20_15-27-23pm.log

lsinventorysession failed:

the oracle home does not meet oui version requirement.

this opatch (version 10.2.0.1.6) detects oui version 10.1.0.5.0 in the home.

it requires oui version 10.2 or above.

opatch failed with error code 73

原因:opatch的版本过高。

下载新的opatch,重新执行opatch lsinventory

[/app/oracle/product/9205/opatch]$ opatch lsinventory

oracle interim patch installer version 1.0.0.0.57

copyright (c) 2007 oracle corporation. all rights reserved..

we recommend you refer to the opatch documentation under

opatch/docs for usage reference. we also recommend using

the latest opatch version. for the latest opatch version

and other support related issues, please refer to document

293369.1 which is viewable from metalink.oracle.com

oracle home : /app/oracle/product/9205

oracle home inventory : /app/oracle/product/9205/inventory

central inventory : /app/oracle/orainventory

from : /var/opt/oracle/orainst.loc

oui location : /app/oracle/product/9205/oui

oui shared library : /app/oracle/product/9205/oui/lib/hpunix/liborainstaller.sl

java location : /app/oracle/product/9205/jre/1.4.2/bin/java

log file location : /app/oracle/product/9205/.patch_storage//*.log

creating log file "/app/oracle/product/9205/.patch_storage/lsinventory__02-20-2008_15-42-43.log"

result:

there is no interim patch

opatch succeeded.

3、具体范例及遇到的问题

下面以打补丁5523799为例

[/app/oracle/product/9205/patches/5523799]$opatch apply

报错:

invoking fuser to check for active processes.

invoking fuser on "/app/oracle/product/9205/bin/oracle"

problems when checking for files that are active.

there were problems when checking for active processes on critical files.

the patch tool runs the command "fuser" to check that critical files are not in use. make sure 'fuser' is available and executable on your path

error: opatch failed during pre-reqs check.

原因为fuser没有执行权限,su - root

/usr/sbin#chmod +x fuser

重新命令,打patch成功

用opatch lsinventory显示打patch结果

[/app/oracle/product/9205/opatch]$ opatch lsinventory

oracle interim patch installer version 1.0.0.0.57

copyright (c) 2007 oracle corporation. all rights reserved..

we recommend you refer to the opatch documentation under

opatch/docs for usage reference. we also recommend using

the latest opatch version. for the latest opatch version

and other support related issues, please refer to document

293369.1 which is viewable from metalink.oracle.com

oracle home : /app/oracle/product/9205

oracle home inventory : /app/oracle/product/9205/inventory

central inventory : /app/oracle/orainventory

from : /var/opt/oracle/orainst.loc

oui location : /app/oracle/product/9205/oui

oui shared library : /app/oracle/product/9205/oui/lib/hpunix/liborainstaller.sl

java location : /app/oracle/product/9205/jre/1.4.2/bin/java

log file location : /app/oracle/product/9205/.patch_storage//*.log

creating log file "/app/oracle/product/9205/.patch_storage/lsinventory__02-20-2008_16-11-49.log"

result:

installed patch list:

=====================

1) patch 5523799 applied on wed feb 20 16:11:14 gmt+08:00 2008

[ base bug(s): 5523799 ]

opatch succeeded.

4、最后通过opatch查看数据库各组件版本

[/app/oracle/product/9205/opatch]$ opatch lsinventory ?details

 
 
上一篇: 讲解v$datafile_header相关字段的使用    下一篇: 探讨基于不绑定变量与绑定变量的柱状图作用 (1)
  相关文档
巧用oracle备份集在测试机上做不完全恢复 06-13
用sys执行全文索引的建立时出现权限不足 03-17
做了archive后如何收缩oracle的数据文件 02-28
exp的版本高于数据库版本导出时出现报错 03-03
“字符型”转换成“日期型”的实例脚本 01-31
oracle failsafe与rac两者之间的不同之处 05-13
oracle dbms_job:每隔特定时间执行特定任务 08-05
oracle 9i在aix上的性能调整──内存篇 06-13
oracle数据库10g环境下修改vip地址的方法 07-25
实例讲解oracle数据库无法启动的解决方法 01-28
windows平台下"one-of-patch"的安装方法 03-05
讲解数据仓库实施过程所需要考虑的步骤 02-20
从多个方面详细讲解sqlplus的使用技巧 (1) 03-04
轻松掌握数据库及数据仓库的建模方法 03-04
清除Oracle中无用索引 改善DML性能 04-11
用Oracle 10g列值掩码技术隐藏敏感数据 04-11
详细讲解oracle中isnumeric的三种实现 03-06
深入研究Oracle数据库空间管理方法 04-11
oracle 10g分区表维护中的两个注意事项 04-30
解析Oracle/Oracle Forms 的多用途代码 09-01
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息