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: execute privileges error

Re: execute privileges error

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1996/12/17
Message-ID: <32b6b65e.1566472@dcsun4>#1/1

The user system gets it's ability to drop users via the DBA role. Since roles are never enabled when a stored procedure executes, SYSTEM doesn't have the ability to drop the user. You need to grant drop user to system first.

On 16 Dec 1996 22:27:56 GMT, lesliet_at_u.washington.edu (L. Tseng) wrote:

>I created the following procedure under SYSTEM
>but keep getting the following error
>
>ERROR at line 1:
>ORA-01031: insufficient privileges
>ORA-06512: at "SYS.DBMS_SYS_SQL", line 239
>ORA-06512: at "SYS.DBMS_SQL", line 25
>ORA-06512: at "SYSTEM.TEST_DBMSSQL", line 7
>ORA-06512: at line 1
>
>SYSTEM has been granted execute any procedure privilege but
>it does not help.
>
>The procedure would only work when created under SYS schema
>and logging in as SYS.
>
>What is wrong???
>
>
>create or replace procedure test_dbmssql
>as
> cursor_name NUMBER;
> ignore NUMBER;
> BEGIN
> cursor_name := DBMS_SQL.OPEN_CURSOR;
> DBMS_SQL.PARSE(cursor_name,'drop user Austin', DBMS_SQL.V7);
> ignore := DBMS_SQL.EXECUTE(cursor_name);
> END;
>

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com


statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Tue Dec 17 1996 - 00:00:00 CST

Original text of this message

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