you can get the pid for the sid from the v$process, then kill the session using the sid and make sure that the process had been terminated, if not terminate them using kill -9 pid
Check this thread also:http://dbasupport.com/forums/showthread.php?threadid=7481
correct me if i am wrong, but as far as i know the unix process may be connected to more hen one oracle process. so, when kiling a process in unix you can create a youeself a problem. you do not kill a process at the os level unless you know for a act that it is supporting only the oracle process you need to kill, and it i not likely that a unix process supports only one oracle user process.
If the system was under the dedicated server option then it is one process perconnection. On the MTS server option, you are correctm at that time you want to kill the session and not the process. Since he did not mention the type of setup, I gave both. Yeah, I was not clear. Sorry about that.
Thank you for the answers , but ...
I know exactly how to kill process in oracle (alter system)
and in unix (kill -9),
but the problem is that i want to write a pl/sql
procedure that kills unix process - i pass the pid
as a parameter and it will go to OS and 'kill -9'
the process there !.
Why ?
Because in some situations oracle only marks the session
for kill and does not actually kill the process
in OS for hours - in example when replication
between two nodes is stuck the only solution
to resume the snapshot jobs is to kill processes
in unix and not in oracle.
Please help me if anyone knows the solution.
I have never done this maybe someone else can help. Spool your result from the v$session and your ps -ef |grep oracle_$sid. Use the diff command to compare the PID differences. Spool the difference to another file and kill all the PID from there.
Bookmarks