Pavan DBA's Blog

The DBA Knowledge Store

Script to kill sniped sessions

Posted by Pavan DBA on October 29, 2009

sqlplus system/manager <<EOF
spool $tmpfile
select p.spid from v\$process p,v\$session s
where s.paddr=p.addr
and s.status=’SNIPED’;
spool off
for x in `cat $tmpfile | grep “^[0123456789]”`
kill -9 $x
rm $tmpfile

One Response to “Script to kill sniped sessions”

  1. satellite TV info…

    […]Script to kill sniped sessions « Pavan DBA's Blog[…]…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: