Tuesday, April 23, 2013

how to kill the session in oracle 11g


The alter system kill session command requires two unique arguments that uniquely identify the Oracle session, the session identifier and serial number.
First you have to identify the session to be killed with alter system kill session.

select SID,SERIAL# from v$session where sid = 666

SID   SERIAL#
-------------------
666 34409

The SID and SERIAL# values of the Oracle session to be killed can then be substituted and the alter system kill session command issued.

alter system kill session '130,620,@1';
                                                                     SID , SERIAL#,inst_id

inst_id can get it from gv$session for the session id which you want to kill.

No comments:

Post a Comment