killing shell process and child oracle process
895815Jan 20 2013 — edited Jan 21 2013From my shell script I am killing my background function process using kill command. This function calls SQL procedure using sqlplus:
func_foo(){
retval=`sqlplus -s $USER_NAME/$PWD <<EOF
set pages 0 lines 120 trimout on trimspool on tab off echo off verify off feed off serverout on
exec pkg_xyz.proc_abc();
exit;
EOF`
}
func_foo&
pid_func_foo=$!
sleep 5
kill $pid_func_foo 2>/dev/null
wait $pid_func_foo 2>/dev/null
Problem with the approach is that even if my function process is killed, Oracle process keeps on running. Oracle process is not getting killed. I am new to oracle, I am not sure how to handle this scenario. Please provide me with the hint on how to handle this scenario.