Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT -- substr(a.spid,1,9) pid,
- b.inst_id,
- b.sid,
- b.serial# AS serial,
- b.machine,
- b.username,
- -- b.server,
- b.osuser AS os_user,
- b.program,
- LOWER(b.status) AS status,
- 'Alter System Kill Session ''' || b.sid || ', ' || b.serial# || ', @' || b.inst_id || ''' Immediate;' AS kill_command
- FROM gv$session b Left Join v$process a ON (b.paddr=a.addr)
- WHERE b.TYPE='USER' AND
- b.machine='etl' AND
- LOWER(b.status)='inactive' AND
- 0=0
- ORDER BY b.sid, b.serial#;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement