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 -> Re: PL/SQL problem

Re: PL/SQL problem

From: <bsonia_at_my-deja.com>
Date: Thu, 04 Jan 2001 20:47:31 GMT
Message-ID: <932nh1$v45$1@nnrp1.deja.com>

1st) Add another variable i.e. (v_int integer) 2nd) After your dbms_sql.v7 line add this:

        v_int := dbms_sql.execute(cid);

Hope this helps

Bill Sonia
Achaia Solutions, Inc

In article <932l7r$7rc$1_at_news.duke.edu>,   "John Jones" <john.jones_at_duke.edu> wrote:
> 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
>
>

Sent via Deja.com
http://www.deja.com/ Received on Thu Jan 04 2001 - 14:47:31 CST

Original text of this message

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