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

Home -> Community -> Usenet -> c.d.o.misc -> Re: sys.DBMS_DDL.CREATE_WRAPPED what other priviledges are needed?

Re: sys.DBMS_DDL.CREATE_WRAPPED what other priviledges are needed?

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Wed, 05 Jul 2006 18:06:12 +0200
Message-ID: <44abe4e3$0$29124$9b4e6d93@newsread4.arcor-online.net>


nkunkov_at_escholar.com schrieb:
> Hi,
> I'm trying to use sys.DBMS_DDL.CREATE_WRAPPED in my own stored
> procedure. I logged in as SYS and gave myself priviledges to execute
> this package. But Oracle 10g still gives me this error:
>
> ORA-01031: insufficient privileges
> ORA-06512: at "SYS.DBMS_DDL", line 643
>
> Is there some other package that I should grant execute permissions to?
> What else should I do to be able to execute the above?
> Appreciate your help.
> Thanks
> NK
>

Can't reproduce your situation. Not as user sys, nor as user with granted execute on SYS.DBMS_DDL.
What happens if you compile your code not via DBMS_DDL ? Here is my testcase.

sys_at_ORA102> show user
USER is "SYS"
sys_at_ORA102> create user wrapped identified by wrapped;

User created.

sys_at_ORA102> grant create procedure to wrapped;

Grant succeeded.

sys_at_ORA102> grant execute on dbms_ddl to wrapped;

Grant succeeded.

sys_at_ORA102> grant create session to wrapped;

Grant succeeded.

sys_at_ORA102> conn wrapped/wrapped
Connected.
wrapped_at_ORA102> @k
wrapped_at_ORA102> declare

   2 l_text varchar2(32767);
   3 begin
   4 l_text := 'CREATE OR REPLACE FUNCTION t RETURN DATE IS    5 l_Date DATE;
   6 BEGIN
   7 SELECT SYSDATE INTO l_Date FROM Dual;    8 RETURN l_Date;
   9 END;';
  10 dbms_ddl.create_wrapped(l_text);
  11 end;
  12 /

PL/SQL procedure successfully completed.

Best regards

Maxim Received on Wed Jul 05 2006 - 11:06:12 CDT

Original text of this message

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