Wednesday, February 8, 2012

"Prerequisite check "CheckActiveFilesAndExecutables” failed error" While issueing opatch apply

Problem

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.

10 comments:

ASM 11.2.0.2 Is Not Releasing File Descriptors After Drop or Dismount Diskgroup. [ID 1306574.1] « Mathijs Bruggink said...

[...] ### second patch failed  which i did not understand. BUT i  came across this brilliant note on the web ( with a big Thank you for blogging about this): http://deryaoktay.wordpress.com/2012/02/08/prerequisite-check-checkactivefilesandexecutables-failed-... [...]

Tom Fredericks said...

This solved my problem. Thanks.

Sairam Nimmala said...

Thank you . This solved my issue

Reddy said...

Was very useful for me. Thank you

Kevin said...

good post. helped me resolve this issue

Simbah said...

You just need to shutdown your listener and dbconsole:

# lsnrctl stop
# emctl stop dbconsole

satya said...

yes its worked for me

satya said...

thank you

JKM said...

Thank you ,its worked for me

Sangeeta said...

Thanks for the post, it resolved my problem, opatch apply process was holding the process and the command helped me to look into this. thanks.

Windows (powershell) counterparts of Linux commands

You may find Windows mostly powershell equivalent of frequently used Linux commands here. I will update this post, with newer ones by the ti...