日期:2014-05-16 浏览次数:20461 次
declare
???????????? cursor?? cur_sess?? is
?????????????????? select?? sid,?? serial#
????????????????????? from?? v$session
???????????????????? where???
????????????????????????? username like 'NO%';
?????????? w_sid?? number;
???????????? w_serial?? number;
???????? begin
?????????? open?? cur_sess;
?????????? loop
?????????????? fetch?? cur_sess?? into?? w_sid,w_serial;
?????????????? if?? cur_sess%notfound?? then
?????????????????? exit;
????????????? end?? if;
?????????????? execute?? immediate?? 'alter?? system?? kill?? session?? '''||w_sid|| ', '||w_serial|| '''';
?????????? end?? loop;
???? end;