kamilch on 08/06/09
Last Edited at 08/06/09 06:10am
DECLARE host_name VARCHAR2(128) = 'hostname'; CURSOR host_sessions IS SELECT '' || sid || '' || serial# AS session_id FROM v$session WHERE machine = host_name ORDER BY sid DESC;BEGIN FOR next_row IN host_sessions LOOP EXECUTE IMMEDIATE 'alter system kill session :1 immediate' using next_row.session_id; END LOOP;END;/
Report this snippet Tweet
Comment:
You need to login to post a comment.