denrepo

OracleSessions

Kill a session

Needs both SID and SERIAL# from V$SESSION; the session and blocking scripts show them together. Add the instance ID as a third value on RAC.

Changes data

Not yet verified. How scripts are tested

This script changes the database. Check the names and values before you run it.
b-ora-kill.sql
1-- 'sid,serial#'  (on RAC: 'sid,serial#,@inst_id')2ALTER SYSTEM KILL SESSION '123,45678' IMMEDIATE;

Save it as b-ora-kill.sql and run it with SQL> @b-ora-kill.

Open in denrepo

More Oracle scripts: Sessions