Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to use execute immediate with session killing?
> 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';
> 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 todayReceived on Fri Feb 14 2003 - 12:14:57 CST
![]() |
![]() |