OPatch 报错:OPatch needs to modify files which are being used by some processes.

在执行下面的语句的时候,opatch报了一个错误,从网上查了下解决办法:

[oratest@lyg 7319922]$ opatch rollback -id 7319922

Oracle Interim Patch Installer version 11.1.0.10.1
Copyright (c) 2013, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/prod/db/tech_st/11.1.0
Central Inventory : /u01/oraInventory
   from           : /u01/prod/db/tech_st/11.1.0/oraInst.loc
OPatch version    : 11.1.0.10.1
OUI version       : 11.1.0.7.0
Log file location : /u01/prod/db/tech_st/11.1.0/cfgtoollogs/opatch/7319922_Sep_21_2013_13_06_09/rollback2013-09-21_13-06-09PM_1.log

RollbackSession rolling back interim patch '7319922' from OH '/u01/prod/db/tech_st/11.1.0'
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:

Following executables are active :
/u01/prod/db/tech_st/11.1.0/bin/oracle           ——貌似意思是说这个地方不能是active的。
[ Error during Prerequisite for rollback Phase]. Detail: RollbackSession failed during prerequisite checks: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/prod/db/tech_st/11.1.0/cfgtoollogs/opatch/7319922_Sep_21_2013_13_06_09/rollback2013-09-21_13-06-09PM_1.log

Recommended actions: OPatch needs to modify files which are being used by some processes.

OPatch failed with error code 41

[oratest@lyg 7319922]$ 

我从网上搜了下面一个人,跟我遇到了相似的错误:

http://deryaoktay.wordpress.com/2012/02/08/prerequisite-check-checkactivefilesandexecutables-failed-error-while-issueing-opatch-apply/

While applying interim patch, I got Prerequisite check “CheckActiveFilesAndExecutables” failed error and resolved the issue with the help of fuser.

oracle@mydb1>opatch apply
 Invoking OPatch 11.2.0.1.8
Oracle Interim Patch Installer version 11.2.0.1.8
 Copyright (c) 2011, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
 Central Inventory : /u01/app/oraInventory
 from           : /etc/oraInst.loc
 OPatch version    : 11.2.0.1.8
 OUI version       : 11.2.0.2.0
 Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-02-01_21-16-28PM.log
Applying interim patch '9578670' to OH '/u01/app/oracle/product/11.2.0/dbhome_1'
 Verifying environment and performing prerequisite checks...
 Prerequisite check "CheckActiveFilesAndExecutables" failed.
 The details are:
Following executables are active :
 /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
 [ Error during Prerequisite for apply Phase]. Detail: ApplySession failed during prerequisite checks: Prerequisite check "CheckActiveFilesAndExecutables" failed.
 Log file location: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-02-01_21-16-28PM.log

Recommended actions: OPatch needs to modify files which are being used by some processes.

OPatch failed with error code 41

————从上面看,跟我遇到的问题基本类似,接着看他的解决方法:

Cause:

Something is using oracle library.

Solution:

I had solved the issue first looking at the log file and saw that the inuse control made by fuser, this is also a clue for me to find who is using the library file.

oracle@mydb1>/sbin/fuser /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
 /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: 12195m
 oracle@mydb1>
oracle@mydb1>ps -ef |grep 12195
 oracle   12195 11944  0 Jan19 pts/7    00:00:00 adrci
 oracle   22813  3717  0 21:18 pts/13   00:00:00 grep 12195
 oracle@mydb1>kill -9 12195

After than I had successfully applied the patch

根据他这种做法,我也试着做了下:

[oratest@lyg 7319922]$ /sbin/fuser /u01/prod/db/tech_st/11.1.0/bin/oracle
/u01/prod/db/tech_st/11.1.0/bin/oracle: 10758e 10760e 10764e 10766e 10768e 10770e 10772e 10774e 10776e 10778e 10780e 10782e 10784e 10786e 10797e 10801e 10815e 10821e 10825e 10916e 12186e
[oratest@lyg 7319922]$ ps -ef|grep 10758
oratest  10758     1  0 12:41 ?        00:00:00 ora_pmon_TESTDB
oratest  12286  5241  0 13:32 pts/3    00:00:00 grep 10758
[oratest@lyg 7319922]$ ps -ef|grep 10760
oratest  10760     1  0 12:41 ?        00:00:00 ora_vktm_TESTDB
oratest  12291  5241  0 13:32 pts/3    00:00:00 grep 10760
[oratest@lyg 7319922]$ ps -ef|grep 12186
oratest  12186     1  0 13:27 ?        00:00:00 ora_w000_TESTDB
oratest  12295  5241  0 13:32 pts/3    00:00:00 grep 12186
[oratest@lyg 7319922]$ ps -ef|grep 10916
oratest  10916     1  0 12:47 ?        00:00:00 ora_smco_TESTDB
oratest  12300  5241  0 13:32 pts/3    00:00:00 grep 10916

我发现都是oracle自己的后台进程,难道要把oracle数据库先关了,再执行这一步?我关了数据库,在执行试试:

我擦,果然关了数据库在执行就好了。。。看来是我经验不足啊。。以后多留意。。

时间: 2024-08-02 17:15:14

OPatch 报错:OPatch needs to modify files which are being used by some processes.的相关文章

OPatch报错 Prerequisite check "CheckActiveFilesAndExecutables" failed

Prerequisite check "CheckActiveFilesAndExecutables" failed 问题背景:    我们在进行数据库打补丁Optatch的时候,突然报错CheckActiveFilesAndExecutables,导致补丁无法进行应用下去. 问题现象: [oracle@db01 18522509]$ /home/oracle/OPatch/opatch apply Oracle Interim Patch Installer version 11.2

OPatch报错 Prerequisite check CheckMinimumOPatchVersion failed

Prerequisite check CheckMinimumOPatchVersion failed 问题现象: [oracle@db01 18522509]$ /DBSoft/Product/11.2.4/db_1/OPatch/opatch apply Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved. Oracle Ho

hp函数setcookie()报错:Warning: Cannot modify header

快要下班的时候,看到php讨论学习群中有朋友说设置cookie的时候.向他要了代码看了原因!报错 Warning: Cannot modify header information – headers already sent by (output started at cookie1.php:4) in cookie1.php on line 5 <?php ob_start(); setcookie("username","宋岩宾",time()+3600

iOS程序在模拟器上无法运行,报错126

问题描述 iOS程序在模拟器上无法运行,报错126 .../Pods/Target Support Files/Pods/Pods-resources.sh: /bin/sh: bad interpreter: Operation not permitted Command /bin/sh failed with exit code 126 解决方案 iOS 模拟器运行报错 解决方案二: * ## 首先你要确定是程序问题还是模拟器问题.这样:新建一个iOS项目,直接运行,如果能正常运行,就说明模

Mysql报错5002 - cannot modify reserved database

从报错上来看是因为没有选择数据库导致的,但实际上我在navicat里面选择了mysql库: 百度没有这个报错的解释 与客服沟通后发现该问题是因为没有业务库导致的: 在ECS的自建库里面,直接use mysql,然后进行操作都是OK的 但是RDS数据库里面自带的mysql库被默认为不能采取这个操作,必须额外建库!! 在新建库上进行操作不再有此报错.

【故障处理】 DBCA建库报错CRS-2566

[故障处理] DBCA建库报错CRS-2566 PRCR-1071 PRCR-1006 一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① dbca静默建库 ② 将监听加入CRS中     Tips:        ① 若文章代码格式有错乱,推荐使用搜狗.QQ或360浏览器,也可以下载pdf格式的文档来查看,pdf文档下载地址:http://

Ensemble.Tofino运行报错Unexpected java bridge exception的解决

作为Visual Studio插件的Flex开发工具,Ensemble公司的Tofino确实很吸引人,包含编译环境的安装文件总共才122M,比起Flex Builder要不少.而且,对于熟悉了VS开发环境的.Net程序员,用这样的插件来做Flex开发方便了很多. 从官网下载安装文件,选择122M的包含开发编译环境的安装包下载.关闭Visual Studio,安装成功后开启Visual Studio,正常情况下Flex项目会出现在新建项目的页面上.新建一个Flex工程,如果你机器的java环境配置

Oracle中DG备库报错ORA-00313、00312、27037

DATAGUARD配置如下: PROD为主库,SBDB为备库 日志组1-3组为redolog file,4-6组为standby log 在创建standby log后主库关库,使用冷备tar包将数据传输到备库进行的恢复. DG配置完成之后,启动备库之后,备库alert日志报错如下: Errors in file /u01/app/oracle/admin/SBDB/udump/sbdb_rfs_14903.trc: ORA-00313: open failed for members of l

Android中R资源未找到至java文件报错

R资源, 是本地xml资源的引用列表, 修改时, 有可能Gradle没有生成, 相应的R资源; 则会出现R资源未找到的错; 导致Java文件异常, 报错. 可以使用: Sync Project with Gradle Files, 即同步项目; 如果未成功, 则应该清除缓存(Catches), 重启项目. 即: File->Invalidate Caches / Restart... 具体参见: http://blog.csdn.net/caroline_wendy/article/detail