Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Killing a Idle session in Oracle DB.
I am using the following script to find out the idle connections. I am spooling to a output file to kill the unix process ids. The output will be.
kill -9 12345
kill -9 23456
The script: ----------------- SELECT 'kill '||'-9 '||b.spid FROM v$session a, v$process b, v$sesstat c, v$sesstat d, v$timer e, v$lock f WHERE a.username is not null AND a.paddr=b.addr AND a.sid=c.sidAND a.sid=d.sid AND c.statistic# =13 AND d.statistic# =14 AND a.sid=f.sid(+) AND f.type(+) = 'TM' AND((sysdate-1/24) >
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Fri Jan 09 1998 - 00:00:00 CST
![]() |
![]() |