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

Home -> Community -> Usenet -> c.d.o.tools -> Kill user sessions from PL/SQL

Kill user sessions from PL/SQL

From: Anatoly Moskovsky <avm_at_trais.com.ua>
Date: 2000/05/31
Message-ID: <HVN2591C576@heaven.org>#1/1

Hi!
I need to kill all user sessions from a stored proc.(I'm implementing an advanced version of DROP USER command that would be able to drop a user irrespective of existing user sessions )

Below it's shown what I do (but this does not work):

Create user Killer ....;
Grant DBA to Killer;
Grant Alter system to Killer;
Grant select any table to Killer;

connect Killer...;
-- a helper proc

Create Or Replace procedure
ExecSQL(s_sql in long)
as
c integer;
begin
  c := dbms_sql.open_cursor;
  Begin
    dbms_sql.parse(c, s_sql, dbms_sql.NATIVE );   Exception When Others Then
   dbms_sql.close_cursor(c);
    raise;
  End;
  dbms_sql.close_cursor(c);
end;
/

Bye Received on Wed May 31 2000 - 00:00:00 CDT

Original text of this message

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