Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: kill session privilage

RE: kill session privilage

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Wed, 14 Jan 2004 18:44:26 -0800
Message-ID: <F001.005DCCBC.20040114184426@fatcity.com>


create procedure kill_your_session (in_sid in sys.v_$session.sid%type,

                                    in_serial# in sys.v_$session.serial#%type)
as

   row_count pls_integer ;
begin

   select count (*)
    into row_count
    from v$session
    where username = user and sid = in_sid and serial# = in_serial# ;    if row_count > 0
   then

      execute immediate 'alter system kill session ''' ||
        to_char (in_sid) || ', ' || to_char (in_serial#) || '''' ;
   end if ;
end ;
/
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Jacques Kilchoer
  INET: Jacques.Kilchoer_at_quest.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jan 14 2004 - 20:44:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US