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
4 Responses

  1. Sridevi K Says:

    Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.


  2. sudha P 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


  3. sathish Says:

    I appreciate that you produced this wonderful article to help us get more knowledge about this topic.
    I know, it is not an easy task to write such a big article in one day, I've tried that and I've failed. But, here you are, trying the big task and finishing it off and getting good comments and ratings. That is one hell of a job done!


    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training


Post a Comment