I checked and it works like a charm. Here is the PL/SQL block that I 
ran:
11:00:47 SQL> select sid,serial# from v$session where username='SCOTT';

       SID    SERIAL#
---------- ----------
        10        535

Elapsed: 00:00:00.50
11:01:10 SQL> ed 1

11:01:32 SQL> /

       SID    SERIAL#
---------- ----------
        10        535

Elapsed: 00:00:00.60
11:01:34 SQL> @1
11:01:39 SQL> declare
11:01:39   2  kill varchar2(2000) := 'alter system kill session ''10,535''';
11:01:39   3  begin
11:01:39   4  execute immediate kill;
11:01:39   5  end;
11:01:39   6  /

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.60
11:01:39 SQL> 

-----Original Message-----
Sent: Wednesday, April 18, 2001 12:46 PM
To: Multiple recipients of list ORACLE-L


Are you sure that "execute immediate" doesn't support "alter system"
command? Maybe it's a bug? Which version, which OS?

-----Original Message-----
Sent: Tuesday, April 17, 2001 7:10 PM
To: Multiple recipients of list ORACLE-L


Hi All,

Further to that, it is necessary to use DBMS_SQL or native dynamic SQL for
this
as PL/SQL does not support ALTER SYSTEM directly.

@   Regards,
@   Steve Adams
@   http://www.ixora.com.au/
@   http://www.christianity.net.au/


-----Original Message-----
Sent: Wednesday, 18 April 2001 3:37
To: Multiple recipients of list ORACLE-L



Create a procedure as SYS (or someone else powerful)
which does the 'alter system' and then grant just the
proc to the user

hth
connor

--- lerobe - Lee Robertson <[EMAIL PROTECTED]>
wrote: > All,
>
> Is there a method for allowing a non DBA user to
> kill their own (and only
> their own) session. I have had a trawl through
> Metalink and have seen
> various methods (using procedures) of doing it but
> all of these appear to
> rely on granting the alter system role to the user.
>
> Oracle 8.0.5.0.0
> Compaq Tru64 4.0f
>
> Regards
>
> Lee
>
> Lee Robertson
> Acxiom
> Tel:    0191 525 7344
> Fax:    0191 525 7007
> Email: [EMAIL PROTECTED]
>
>
>
>
> The information contained in this communication is
> confidential, is intended only for the use of the
> recipient
> named above, and may be legally privileged. If the
> reader
> of this message is not the intended recipient, you
> are
> hereby notified that any dissemination, distribution
> or
> copying of this communication is strictly
> prohibited.
> If you have received this communication in error,
> please
> re-send this communication to the sender and delete
> the
> original message or any copy of it from your
> computer
> system.
>


=====
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steve Adams
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gogala, Mladen
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gogala, Mladen
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to