DebugFactor.com | Forum

Error: Prerequisite check CheckActiveFilesAndExecutables failed while upgrading from Oracle 19.3 to Oracle 19.9 with Opatch

I am trying to upgrade my Oracle 19.3 installation to Oracle 19.9 with p6880880_190000_Linux-x86-64.zip and Opatch utility.

I am facing the following error while running opatch

I have extracted the contents of p31771877_190000_Linux-x86-64.zip and executed opatch in the extracted folder.

$ORACLE_HOME/OPatch/opatch apply

Log:

[INFO]     Following active executables are not used by opatch process :
    /opt/oracle/product/19c/dbhome_1/bin/oracle

    Following active executables are used by opatch process :
[INFO]     Prerequisite check "CheckActiveFilesAndExecutables" failed.
   The details are:
     Following active executables are not used by opatch process :
         /opt/oracle/product/19c/dbhome_1/bin/oracle
     Following active executables are used by opatch process :

[SEVERE]   OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[INFO]     Finishing UtilSession at Tue Jun 01 05:20:42 UTC 2021
[INFO]     Log file location: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2021-06-01_05-20-03AM_1.log
[INFO]     Stack Description: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
        at oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:6805)
        at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:1013)
        at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:376)
        at oracle.opatch.opatchutil.NApply.process(NApply.java:356)
        at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1136)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at oracle.opatch.UtilSession.process(UtilSession.java:355)
        at oracle.opatch.OPatchSession.process(OPatchSession.java:2660)
        at oracle.opatch.OPatch.process(OPatch.java:853)
        at oracle.opatch.OPatch.main(OPatch.java:910)
Caused by: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
         ... 13 more
Caused by: oracle.opatch.PrereqFailedException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
         ... 13 more

This usually happens when oracle process ( /opt/oracle/product/19c/dbhome_1/bin/oracle) is running while you try to use Opatch to install a patch. It is recommended to stop the listener and database before patching you oracle installation.

Ever after stopping the Listener and Database if you are still seeing the error, you have to find out the process IDs associated with the oracle process and kill them

To find the process details associated with an executable, use this command.

/sbin/fuser /opt/oracle/product/19c/dbhome_1/bin/oracle
Output:

/opt/oracle/product/19c/dbhome_1/bin/oracle:  1462e  1464e  1466e  1468e  1472e  1476e  1478e  1481e  1483e  1486e  1488e  1490e  1492e  1494e  1496e  1498e  1500e  1502e  1504e  1506e  1508e  1510e  1512e  1514e  1518e  1520e  1522e  1524e  1526e  1536e  1538e  1540e  1542e  1544e  1548e  1550e  1552e  1554e  1556e  1723e  1727e  1730e  1746e  1815e  1817e  1925e  1927e  2315e  3186e  3188e  3192e  3196e  3200e  3418e  4356e  4358e  4362e  4366e  4949e  5459e  5674e  5934e  6010e

These numbers indicate the process IDs associated with the oracle executable. Remove the alphabet at the end to get the process ID. Kill all of the listed processes.

kill -9 1462 

Tip:

You can kill multiple processes with single line command like this.

kill -9 1234 5678 09123