When you set the resource_limit parameter to true in the database and set the idle_time parameter in the profiles to a value other than unlimited, the database will kill any sessions that are idle for the time specified by idle_time.
These sessions will be seen as “SNIPED” in “v$session” view. The processes of these sessions need to be killed at the operating system level. In Linux environments, SNIPED sessions can be killed with the following script.
You can create a shell script file named “kill_sniped_session.sh” and if you import the following script into this file, you can kill sniped sessions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/bin/bash . /home/oracle/.profile.ORCL tmpfile=/tmp/tmp.$$ sqlplus / as sysdba <<EOF spool $tmpfile select p.spid from v\$process p,v\$session s where s.paddr=p.addr and s.status='SNIPED'; spool off EOF for x in `cat $tmpfile | grep "^[0123456789]"` do kill -9 $x done rm $tmpfile |