2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

20
vg/kill_sniped.sql Normal file
View File

@@ -0,0 +1,20 @@
set serveroutput on
DECLARE
sqlstatement VARCHAR2(200);
BEGIN
FOR i in (select * from gv$session s where s.type <> 'BACKGROUND' and s.status = 'SNIPED')
LOOP
BEGIN
sqlstatement := 'alter system kill session ''' || i.sid || ',' || i.serial# || ',@' || i.inst_id || ''' immediate';
dbms_output.put_line(sqlstatement);
execute immediate sqlstatement;
EXCEPTION
WHEN OTHERS THEN
NULL;
DBMS_OUTPUT.PUT_LINE(sqlerrm);
END;
END LOOP;
END;
/