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

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL problem

PL/SQL problem

From: John Jones <john.jones_at_duke.edu>
Date: Thu, 4 Jan 2001 15:08:52 -0500
Message-ID: <932l7r$7rc$1@news.duke.edu>

Been a while since I did PL/SQL programming and trying to code a procedure that kills a session. Can someone help me, seem to be stuck. below is the code. It says that it executes sucessfully, but it does not kill the session????

create or replace procedure kill_session( aSid in v$session.sid%type)
is
nSerial number;
cid number;
begin
cid := dbms_sql.open_cursor;
select serial# into nSerial from v$session where sid=aSid; dbms_output.put_line('alter system kill session
'''||aSid||','||nserial||'''');

dbms_sql.parse(cid,'alter system kill session
'''||aSid||','||nserial||'''',dbms_sql.v7);
dbms_sql.close_cursor(cid);
end;

--
John Jones
Senior Oracle DBA
Duke University, OIT
john.jones_at_duke.edu
Received on Thu Jan 04 2001 - 14:08:52 CST

Original text of this message

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