Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: kill session privilege
Ideally you should filter current sid/serial# ... else you'll get error .. no?
Raj
-----Original Message-----
Sent: Wednesday, January 14, 2004 9:44 PM
To: Multiple recipients of list ORACLE-L
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 ;
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).
**************************************************************************************4
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 Thu Jan 15 2004 - 06:19:34 CST
![]() |
![]() |