Sunday 13 July 2014

[Solved] opatch apply failed with error " Following executables are active under Oracle Home libclntsh.so.11.1 : OPatch failed with error code 73"

=======================================
Note :
please use the commands carefully before executing in your server its advised to test in test server.

Note : 
Implementing or trying any of the advice from this blog is at your own risk.
=======================================

Entered commands are highlighted in Blue Colour
To be noticed from the output is highlighted in  Red Colour

Solution was to find if any session connected thru cronjob, if so kill it and try agian.

Following executables are active :
/u01/OH/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/OH/cfgtoollogs/opatch/opatch2014-01-05_06-43-04AM_1.log

OPatch failed with error code 73


sol_test1 $ ps -ef|grep oracle
  oracle 11506 11500   0 06:43:02 ?           0:00 sh -c ORACLE_HOME=/u01/OH; export ORACLE_HOME; echo
  oracle 11508 11507   0        - ?           0:00 <defunct>
  oracle 11507 11506   0 06:43:02 ?           0:00 /u01/OH/bin/sqlplus -s monitor_usr/*******@TEST1
  oracle 11975 28738   0 06:43:20 pts/2       0:00 grep oracle
  oracle 11974 28738   0 06:43:20 pts/2       0:00 ps -ef
    root 10018  9973   0 22:28:34 pts/1       0:00 sudo su - oracle
  oracle 28738 28737   0 06:33:35 pts/2       0:00 -ksh
    root 28737  6953   0 06:33:35 pts/2       0:00 sudo su - oracle
  oracle 10019 10018   0 22:28:34 pts/1       0:00 -ksh
sol_test1 $ kill -9 11507 11506

After killing the session which was trying to connect the DB from crontab to monitor
Chained session which is starting from 1150* was killed
patch installed successful