create procedure killsession
as
--set serveroutput on; --in oracle sql developer this cannot be ignore
DECLARE
v_cresql clob;
v_id v$session.SID%TYPE;
v_s v$session.SERIAL#%TYPE;
CURSOR cv_cresql_cursor IS
select SID,SERIAL# from v$session;
BEGIN
OPEN cv_cresql_cursor;
LOOP
FETCH cv_cresql_cursor INTO v_id,v_s;
EXIT WHEN cv_cresql_cursor%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('alter system kill session '''||v_id||','||v_s||''';');
END LOOP;
CLOSE cv_cresql_cursor;
END;

相关文章:

  • 2021-11-15
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-01-28
  • 2021-12-12
相关资源
相似解决方案