Script to kill user sessions in Oracle

Script to kill all sessions of a user in Oracle. BEGIN FOR r IN (select sid,serial# from v$session where username = 'USER') LOOP EXECUTE IMMEDIATE¬†'alter system kill session "' || r.sid¬† || ',' || r.serial# || ""; END LOOP; END; Manual Retrieve session identifiers and session serial number (which uniquely identifies a session's objects): select […]