Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: execute privileges error
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
![]() |
![]() |