Sunday, April 13, 2008

user fuser to find out process

dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475> opatch apply
Invoking OPatch 10.2.0.2.0

Oracle interim Patch Installer version 10.2.0.2.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /software/oracle/product/10.2.0
Central Inventory : /software/oracle/oraInventory10g
from : /software/oracle/product/10.2.0/oraInst.loc
OPatch version : 10.2.0.2.0
OUI version : 10.2.0.2.0
OUI location : /software/oracle/product/10.2.0/oui
Log file location : /software/oracle/product/10.2.0/cfgtoollogs/opatch/opatch-2008_Apr_13_16-57-54-SGT_Sun.log

ApplySession applying interim patch '5169475' to OH '/software/oracle/product/10.2.0'
Invoking fuser to check for active processes.
Invoking fuser on "/software/oracle/product/10.2.0/bin/oracle"

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/software/oracle/product/10.2.0')

Is the local system ready for patching?

Do you want to proceed? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '5169475' for restore. This might take a while...
Backing up files affected by the patch '5169475' for rollback. This might take a while...

Patching component oracle.rdbms.rsf, 10.2.0.2.0...
Updating archive file "/software/oracle/product/10.2.0/lib/libgeneric10.a" with "lib/libgeneric10.a/slrac.o"
Updating archive file "/software/oracle/product/10.2.0/lib32/libgeneric10.a" with "lib32/libgeneric10.a/slrac.o"

Patching component oracle.rdbms, 10.2.0.2.0...
Running make for target client_sharedlib
Make failed to invoke "/usr/ccs/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/software/oracle/product/10.2.0"....'rm: /software/oracle/product/10.2.0/lib/libclntsh.so.10.1 not removed. Text file busy
genclntsh: Failed to remove /software/oracle/product/10.2.0/lib/libclntsh.so.10.1

Stop.
'
rm: /software/oracle/product/10.2.0/lib/libclntsh.so.10.1 not removed. Text file busy
genclntsh: Failed to remove /software/oracle/product/10.2.0/lib/libclntsh.so.10.1

Stop.

Do you want to proceed? [y|n]
n
User Responded with: N
Apply Session failed: ApplySession failed in system modification phase... 'ApplySession::apply failed: rm: /software/oracle/product/10.2.0/lib/libclntsh.so.10.1 not removed. Text file busy
genclntsh: Failed to remove /software/oracle/product/10.2.0/lib/libclntsh.so.10.1

Stop.
'
OPatch will attempt to restore the system...
Restoring the Oracle Home...
Checking if OPatch needs to invoke 'make' to restore some binaries...

Make result:
Command: /usr/ccs/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/software/oracle/product/10.2.0

Returned code: 1
Stdout output:
/software/oracle/product/10.2.0/bin/genclntsh
*** Error exit code 1

Stderr output:
rm: /software/oracle/product/10.2.0/lib/libclntsh.so.10.1 not removed. Text file busy
genclntsh: Failed to remove /software/oracle/product/10.2.0/lib/libclntsh.so.10.1

Stop.


--------------------------------------------------------------------------------
The following Make Commands have failed:
cd $ORACLE_HOME/rdbms/lib;/usr/ccs/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=$ORACLE_HOME

These are commands from the file /software/oracle/product/10.2.0/.patch_storage/5169475_Mar_19_2007_03_45_26/make.txt

Invoke these commands manually to restore the binaries in the Oracle Home.
OPatch failed to restore OH '/software/oracle/product/10.2.0'. Consult OPatch document to restore the home manually before proceeding.
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67200:Make failed to invoke "/usr/ccs/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/software/oracle/product/10.2.0"....'rm: /software/oracle/product/10.2.0/lib/libclntsh.so.10.1 not removed. Text file busy
genclntsh: Failed to remove /software/oracle/product/10.2.0/lib/libclntsh.so.10.1

Stop.
'
--------------------------------------------------------------------------------

OPatch failed with error code 115

dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475> /usr/sbin/fuser /software/oracle/product/10.2.0/lib/libclntsh.so.10.1
/software/oracle/product/10.2.0/lib/libclntsh.so.10.1: 7679m

dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475> /usr/sbin/fuser /software/oracle/product/10.2.0/lib/libclntsh.so.10.1
dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475> ps -ef |grep 7679
oracle 12729 11267 0 17:01:19 pts/0 0:00 grep 7679
oracle 7679 1 0 Mar 27 ? 52:31 /software/oracle/product/10.2.0/bin/tnslsnr LISTENER10g -inherit
dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475> lsnrctl stop LISTENER10g

LSNRCTL for HPUX: Version 10.2.0.2.0 - Production on 13-APR-2008 17:01:29

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev07.m1.com.sg)(PORT=1522)))
The command completed successfully
dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475> /usr/sbin/fuser /software/oracle/product/10.2.0/lib/libclntsh.so.10.1
/software/oracle/product/10.2.0/lib/libclntsh.so.10.1:
dev07:B.11:TESTDB:/software/oracle/admin/PATCH/5169475>