www.oradev.com
  Database   Sql   Functions   Packages   Performance   Books   Oracle   Other   About   XML   ORA-messages
  Killing Oracle sessions

Database/Sql

Pl/sql tools
create table
Database scheduler
create tablespace
dba metrics
Table with sequenced numbers
Autonomous transaction
ORA-12537 error
Parse a String in pl/sql
Export with oracle datapump


  OraDev.com

Killing a session in Oracle

Sessions in oracle can be killed with the command:
SQL> alter system kill session 'sid,serial#';
The value for sid and serial# can be query'd using the following query:
select * from v$session
or
select sid, serial#, osuser, program
from   v$session;
After this command, the indicated session is marked for kill. When it's possible the session will be killed. Sometimes this can take a while (for example when a lot of rollback is needed).
To kill a session faster you can use the keyword IMMEDIATE like this:
SQL> alter system kill session 'sid,serial#' immediate;