CURSOR killUser is
select sid,serial#,username from v$session where UPPER(username)=UPPER('tb_test');
begin
if killUser%isopen = false then
open killUser ;
end if;
fetch killUser into v_sid,v_serial,v_userName;
while killUser%found loop
execute immediate 'alter system kill session '''||v_sid||','||v_serial||'''';
fetch killUser into v_sid,v_serial,v_userName;
end loop;
close killUser;
end;
/