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: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 4 Jan 2001 21:16:30 +0100
Message-ID: <932niq$8clr1$3@ID-62141.news.dfncis.de>

This command only marks the session as killed. If you don't have dead connection enabled on sqlnet it can take quite a while before PMON decides the session is dead.
Killing the O/S process is recommended.
To do so you need the spid in v$process (and you need to join the v$session and v$process tables on paddr and addr) and spawn the orakill command (NT) or use kill -9
(Unix).

Hth,

Sybrand Bakker, Oracle DBA

"John Jones" <john.jones_at_duke.edu> wrote in message news:932l7r$7rc$1_at_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:16:30 CST

Original text of this message

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