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: how to use execute immediate with session killing?

Re: how to use execute immediate with session killing?

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 14 Feb 2003 18:14:57 GMT
Message-ID: <b2jbn1$1d1c3h$1@ID-82536.news.dfncis.de>

> this is dying on me. is there a way to do this dynamically?
>
> EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION '':1,:2''';
> USING v_sid, v_serial#;

You cannot use bind variables within '....', the following should work:

create or replace procedure kill_session(sid in number, serial in number) as begin
  execute immediate 'alter system kill session '''

      || sid    || ',' 
      || serial || ''' immediate';

end;
/

> I have a requirement to allow users to be able to kill a job that is
> running. only way to do that is to kill the session. So Im giving them
> a wrapper.

If this procedure is helping you on this, I don't know.

Rene Nyffenegger

-- 
  no sig today
Received on Fri Feb 14 2003 - 12:14:57 CST

Original text of this message

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