Terminate Apps Sessions

How to Terminate Apps Sessions from background
==============
SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND';

The basic syntax for killing a session is shown below.

SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';

In a RAC environment, you optionally specify the INST_ID,
shown when querying the GV$SESSION view.
This allows you to kill a session on different RAC node.

ALTER SYSTEM KILL SESSION 'sid,serial#@inst_id';

In addition to the syntax described above, you can add the IMMEDIATE clause.

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

Comments

Popular posts from this blog

PO & Receipt Query

Supplier SQL query

Inventory Item Attributes, Categories, Vendor & Costs