Thursday, February 25, 2016

Oracle : Prerequisite check "CheckActiveFilesAndExecutables" failed ; OPatch failed with error code 73

While patching the oracle database, the patch apply failed with below error

Following executables are active :
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /opt/app/oracle_db/oracle/product/oracle_db/cfgtoollogs/opatch/opatch2016-02-25_11-13-41AM_1.log

OPatch failed with error code 73

Cause :
Something is using the library , we need to find what is using it and kill it.

find the culprit using fuser

Solution :

oracle_db@sev2(174) oracle_db /opt/app/patches
$ fuser /opt/app/oracle_db/oracle/product/oracle_db/lib/
/opt/app/oracle_db/oracle/product/oracle_db/lib/ 118942m
oracle_db@sev2(175) oracle_db /opt/app/patches
$ ps -ef | grep 118942
oracle_db  95662  57918  0 11:15 pts/0    00:00:00 grep 118942
oracle_db 118942 118378  0 Jan21 ?        00:00:00 sqlplus -s              @/opt/app/oracle_db/backup/rman/common/info.sql  oracle_db
oracle_db@sev2(176) oracle_db /opt/app/patches
$ kill -9 118942

And then start the patch apply. Hope this resolves your problem

Monday, February 1, 2016

Oracle : How to add comments to Alert Log

To add comments to Alert log of Oracle Database, you can run the below command

SQL> execute sys.dbms_system.ksdwrt(2,'Hi, Hello World');

PL/SQL procedure successfully completed.

Note that the first parameter MUST be a 2.