Group Team

This article is used to explain how to kill any session based on the object name.

a. Getting the session id for the Object name

Object type for the object name to be killed can be any one of the following
1.       TYPE
2.       CURSOR
3.       FUNCTION
4.       INDEX
5.       JAVA CLASS
6.       LIBRARY
7.       MULTI-VERSIONED OBJECT
8.       NON-EXISTENT
9.       NONE
10.    PACKAGE
11.    PACKAGE BODY
12.    PROCEDURE
13.    RULE EVALUATION CONTEXT
14.    SEQUENCE
15.    SYNONYM
16.    TABLE
17.    TRIGGER
18.    VIEW

Get the session id based on the object name based on below query

SELECT SID,
              owner,
                              OBJECT,
                              TYPE
  FROM v$access
 WHERE OBJECT = ‘Object Name’

b. Get the serial number for the session based on the session id got from above qyery.

SELECT SID,
             serial#,
                             ownerid,
                             status,
                             server,
                             username,
                             osuser,
                             process,
                             machine
  FROM v$session
 WHERE SID = ‘Session id from above query’

c. Command to kill the session

   ALTER SYSTEM KILL SESSION 'Sid from query2, Serial# from Query 2'

Labels: edit post
2 Responses

  1. Unknown Says:

    I prefer to study this kind of material. Nicely written information in this post, the quality of content is fine and the conclusion is lovely. Things are very open and intensely clear explanation of issues

    Selenium training in Chennai

    Selenium training in Bangalore


Post a Comment