ORA-00027 cannot kill current session

 
ORA-00027 cannot kill current session
Cause: An attempt was made to use ALTER SYSTEM KILL SESSION to kill the
current session.
Action: If it is necessary to kill the current session, do so from another session.

ORA-00027 comes under "Oracle Database Server Messages". 
These messages are generated by the Oracle database server when running any Oracle program.

How to kill session:
1. identify which session to kill using following query:
 select 
  s.sid,
  s.serial#,
  spid,
  trim(s.machine) machine,
  trim(s.module) module,
  status
 from
  v$session s,
  v$process p
 where
  paddr=addr
  and module is not null
 order by 1,2
 
2. Killing a session
 ALTER SYSTEM KILL SESSION 'sid,serial#';
 
 or you can kill at OS level on linux using
 kill -9 spid
 
Related Post:
 - Stopping Query without killing the session

7 comments:

  1. why we need to kill any session ??

    ReplyDelete
  2. because may be some one is executing a query you need to stop

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. I wwas examining some of your articles on this website and
    I believe this website iis really instructive!
    Retain putting up.

    ReplyDelete
  5. am using this "ALTER SYSTEM KILL SESSION 'sid,serial#';" but not get a result,
    any other options .

    ReplyDelete
  6. Import Globals is one of the leading import export data provider for India, Brazil, USA, and Kenya. For more information visit our website.
    India Import Data

    ReplyDelete
  7. Electricians can install and maintain security systems, including surveillance cameras and alarm systems. EV Charger Installation

    ReplyDelete