Skip to content

Killing an Oracle session

Every time you log into Oracle, you create a session. This is an easy way to kill these Oracle sessions, thanks to this article.

First, select the session ID and serial number as such :

  SELECT s.sid, s.serial#, s.osuser, s.program
    FROM v$session s;

The osuser and program field can be used to identify the session.

Then you can kill the session using :

  ALTER SYSTEM KILL SESSION 'sid,serial#';

It’s also possible to kill the session immediately (but that’s considered rude) :

  ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*