joi, 11 iunie 2015

Oracle - how to kill a running select

It may come in handy when thniks go crazy.

1. To find the sid, session id, and the serial#, serial number run the following select:
select s.sid, s.serial#, p.spid, s.username, s.schemaname
     , s.program, s.terminal, s.osuser
  from v$session s
  join v$process p
    on s.paddr = p.addr
 where s.type != 'BACKGROUND'
 and s.username = 'FEES';
2.Kill the session
 alter system kill session 'sid,serial#' immediate;

The source of the solution

Bancul zilei:
La deschiderea unui heapdump primesc eroarea de OutOfMemoryError.