Wednesday, March 31, 2010

OPatch failed with error code 74 - CheckActiveFilesAndExecutables failed

Problem Description
When applying opatch it fails with OPatch failed with error code 74. Further error investigation shows that Prerequisite check "CheckActiveFilesAndExecutables" failed which is displayed below.
oracle:/nas/sysadm/oracle/psu/HP/9119284>opatch apply
Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation. All rights reserved.


Oracle Home : /oracledba/app/oracle/product/10.2.0/db
Central Inventory : /oracledba/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.4.9
OUI version : 10.2.0.4.0
OUI location : /oracledba/app/oracle/product/10.2.0/db/oui
Log file location : /oracledba/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-03-31_02-17-24AM.log

Patch history file: /oracledba/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '9119284' to OH '/oracledba/app/oracle/product/10.2.0/db'
Interim patch 9119284 is a superset of the patch(es) [ 7609058 7609057 7592346 7375617 7375613 7375611 7197583 715 5252 7155251 7155250 7155249 7155248 ] in the Oracle Home
OPatch will rollback the subset patches and apply the given patch.
Execution of 'sh /nas/sysadm/oracle/psu/HP/9119284/custom/scripts/init -apply 9119284 ':

Return Code = 0

Running prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following executables are active :
/oracledba/app/oracle/product/10.2.0/db/bin/oracle
ApplySession failed during prerequisite checks: Prerequisite check "CheckActiveFilesAndExecutables" failed.
System intact, OPatch will not attempt to restore the system
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67620:Interim patch 9119284 is a superset of the patch(es) [ 7609058 7609057 7592346 7375617 7375613 737561 1 7197583 7155252 7155251 7155250 7155249 7155248 ] in the Oracle Home
--------------------------------------------------------------------------------

OPatch failed with error code 74

Cause of the Problem
The Prerequisite check failed because one/more oracle files are active, which violates the requirement of opatch apply.

If there is a RAC environment, then before applying patch shutdown all instances and listeners in the RAC environment.

If this is not a RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating.

As you see in the error message
"Following executables are active :
/oracledba/app/oracle/product/10.2.0/db/bin/oracle"
the problem happened because in one instance oracle binary is still active.

There is also another possible reason of Prerequisite check fail due to oracle bug.

Solution of the problem
Ensure that all database instances/services, processes, listeners are shutdown currently those are being patched. You can check whether any process running or not by issuing query,
$ ps -ef | grep oracle
$ ps -ef | grep tns

If any process running you may want to kill that using kill -9 command.
Note that you might also need to exit from sql*plus client tool if you are connected as sysdba.

sql> exit;

If you see there is no oracle database process then possibly you might hit oracle Bug 6006980.
Workaround to solve this bug
1. Copy fuser executable from /bin to /sbin as root user.
2. Re-run the opatch command as "oracle" user.

Related Documents
How to Download Patchset or Opatch from metalink
List of Patchset number in metalink

No comments:

Post a Comment