SELECT 'alter system kill session '''|| SE.sid||',' ||SE.serial#||''';',sql
SE.sid,session
SE.serial#,spa
PR.spid,io
SE.status,im
SUBSTR(SE.program, 1, 20) PROG,img
SUBSTR(SE.machine, 1, 30) MACH,process
SQ.sql_textco
FROM v$session SE, v$sqlarea SQ, v$process PRbackground
WHERE SE.paddr = PR.ADDR(+)
AND SE.sql_address = SQ.address(+)
AND schemaname <> 'SYS'
ORDER BY SE.sid;