Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Ability for non DBA user to kill session.

RE: Ability for non DBA user to kill session.

From: Gogala, Mladen <MGogala_at_oxhp.com>
Date: Thu, 19 Apr 2001 11:42:47 -0700
Message-ID: <F001.002ECC79.20010419080538@fatcity.com>

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


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: hamcdc_at_yahoo.co.uk

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: ListGuru_at_fatcity.com (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: steve.adams_at_ixora.com.au

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: ListGuru_at_fatcity.com (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: MGogala_at_oxhp.com

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: ListGuru_at_fatcity.com (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: MGogala_at_oxhp.com

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: ListGuru_at_fatcity.com (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).
Received on Thu Apr 19 2001 - 13:42:47 CDT

Original text of this message

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