$ cat create_session_kill_script.sql
spool session_kill.sql
set pages 300
select 'alter system kill SESSION '''|| SID ||','|| SERIAL# ||''';'
from v$session
where machine in ('twas2','twas3')
/
spool off
exit
- system 계정으로 session_kill.sql 를 실행한다.
$ sqlplus system/***** @session_kill.sql