Following link advises to find non-local background processes and kill them using following bash script.
Solution 1) : without shutdown anything just kill that database
processes which are not local processes. local means background
processes.
ps -ef | grep $ORACLE_SID | grep -v grep | grep "LOCAL=NO" | awk '{print $2}' | xargs kill -9
I read this script as.
- ps -ef ,find all processs
- pipe it to grep
- filter $ORACLE_SID, that is find $ORACLE_SID lines, pipe it
- filter out grep’s line
- filter “LOCAL=NO”
- use awk to print column 2, that is process id
- use xargs kill command to kill this processes.
This solution obviously in linux/unix since it uses the fact that “Oracle uses process architecture in linux/unix” and bunch of other unix commands. But Oracle in windows uses thread architecture.
Is there any equivalent in Windows Box, graphical or otherwise? I am aware of Process Explorer and I will look into it. But I wanted to ask here first.
To re-iterate I am not asking how to kill in windows box (orakill) but how to find session/thread in Windows using command line tools without logging in database so that I can use orakill.