select 'Alter system kill session '''||a.sid||','||a.SERIAL#||''''||';' from v$session a, v$lock b where a.username is not null and a.SID=b.SID and a.STATUS= 'INACTIVE'
select Alter system kill session ||a.sid||,||a.SERIAL#||||; from v$session a, v$lock b where a.username is not null and a.SID=b.SIDand a.STATUS= INACTIVE