Monday, 16 July 2012

How to kill a Oracle database session

Business Case:
This post to help Apps developers to kill the blocked session in the lower instances without waiting for DBA.
For production executions please contact your DBA's

Run the following query:


select sid, serial#, username, status, server
  from v$session;

       SID    SERIAL# USERNAME                       STATUS   SERVER
---------- ---------- ------------------------------ -------- ---------
        23         38                                ACTIVE   DEDICATED
        25          1                                ACTIVE   DEDICATED
        26      10516 SYSTEM                         ACTIVE   DEDICATED
        29         93 SRINI02                         ACTIVE   DEDICATED


Findout the session and kill by passing the SID, SERIAL# combination.

Example:
alter system kill session '29, 93';

No comments:

Post a Comment