Kill all sessions of a sql_id - Oracle Database Script. SELECT 'alter system kill session ' ||''''||SID||','||SERIAL#||' immediate ;' FROM v$session WHERE sql_id='&sql_id'; --- FOR RAC select 'alter system kill session ' ||''''||SID||','||SERIAL#||',@'||inst_id||''''||' immediate ;' from gv$session where sql_id='&sql_id'
SELECT 'alter system kill session ' ||''''||SID||','||SERIAL#||' immediate ;' FROM v$session WHERE sql_id='&sql_id'; --- FOR RAC select 'alter system kill session ' ||''''||SID||','||SERIAL#||',@'||inst_id||''''||' immediate ;' from gv$session where sql_id='&sql_id'