Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Killing a Idle session in Oracle DB.

Killing a Idle session in Oracle DB.

From: <vaidyanathan_viswanathan_at_notes.up.com>
Date: 1998/01/09
Message-ID: <884379473.854458373@dejanews.com>#1/1

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.sid
AND 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) >
(sysdate-(e.hsecs-d.value)/(24*3600*100))) AND a.username not in
('SYS','SYSTEM','ICOG999','UPRR','UPRR_R','OPS$ICOG999','OPS$U
PRR','OPS$UPRR_R','OPS$SYS','OPS$SYSTEM','OPS$ROOT','ROOT','ORACLE','OPS$ ORACLE' ); Question: Is anyone knows how to check the validity of the output ? i.e how to check whether the process is really idle or not ?
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Fri Jan 09 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US