Tuesday, 9 August 2022

Prerequisite Check “CheckActiveFilesAndExecutables” Failed

While applying a patch to oracle binary using opatch utility, got below error.

Error - 

$ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.32
Copyright (c) 2022, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0mydb
Central Inventory : /u01/app/oracle/product/19.0.0mydb/oraInventory
   from           : /u01/app/oracle/product/19.0.0mydb/oraInst.loc
OPatch version    : 12.2.0.1.32
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0mydb/cfgtoollogs/opatch/opatch2022-08-08_22-55-58PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following active files/executables/libs are used by ORACLE_HOME :/u01/app/oracle/product/19.0.0mydb
/u01/app/oracle/product/19.0.0mydb/lib/libclntsh.so.19.1
/u01/app/oracle/product/19.0.0mydb/lib/libsqlplus.so


Log file location: /u01/app/oracle/product/19.0.0mydb/cfgtoollogs/opatch/opatch2022-08-08_22-55-58PM_1.log

OPatch failed with error code 73

-------------------------

The details are:


Following active files/executables/libs are used by ORACLE_HOME :/u01/app/oracle/product/19.0.0mydb

/u01/app/oracle/product/19.0.0mydb/lib/libclntsh.so.19.1

/u01/app/oracle/product/19.0.0mydb/lib/libsqlplus.so


log file location: /u01/app/oracle/product/19.0.0mydb/cfgtoollogs/opatch/opatch2022-08-08_22-55-58PM_1.log


OPatch failed with error code 73

-----------------------

Solution - 

Following executables are active :

/u01/app/oracle/product/19.0.0mydb/lib/libclntsh.so.19.1

/u01/app/oracle/product/19.0.0mydb/lib/libsqlplus.so

/sbin/fuser /u01/app/oracle/product/19.0.0mydb/lib/libclntsh.so.19.1

/u01/app/oracle/product/19.0.0mydb/lib/libclntsh.so.19.1: 29785m 

ps -ef |grep 29785

oracle 29785 29255 0 15:02:33 pts/2 0:00 sqlplus / as sysdba

kill -9 29785

Now Check again

/sbin/fuser /u01/app/oracle/product/19.0.0mydb/lib/libclntsh.so.19.1

Nothing for this executables...

Now check for another file -

/sbin/fuser /u01/app/oracle/product/19.0.0mydb/lib/libsqlplus.so

It will show any process id kill that also and keep checking till no process are running from those executables and then check again.

-------------

Now check again - 

$ORACLE_HOME/OPatch/opatch apply 

It will work.

Thanks
DB Tech Solutions Team

Prerequisite Check “CheckActiveFilesAndExecutables” Failed

While applying a patch to oracle binary using opatch utility, got below error. Error -  $ORACLE_HOME/OPatch/opatch apply Oracle Interim Patc...