select * from v$session where status='ACTIVE'; select 'alter system kill session "'||sid||','||serial#||'";' AS matarSessao from v$session where status in ('SNIPED','INACTIVE','KILLED') AND seconds_in_wait > 14400 and username is not null;