That particualar user should have 'SELECT_ANY_DICTIONARY' privilege
-----Original Message-----
From: Vish Penmetsa [mailto:[Email Address Removed] 29 March 2003 09:17
To: LazyDBA.com Discussion
Subject: Oracle error 01031
Hi,
I am trying to get some pl/sql right.
I am able to execute some ddl from an anonymous block but not from
a
procedure.
The account is the same in both cases. Can somebody please point
out where I am making the mistake.
Thanks
SQL> create procedure tst(str varchar2) is
2 begin
3 execute immediate str;
4 end;
5 /
Procedure created.
SQL> drop table x;
Table dropped.
SQL> execute tst('create table x as select * from y');
BEGIN tst('create table x as select * from y'); END;
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "RE.TST", line 3
ORA-06512: at line 1
SQL> declare
2 begin
3 execute immediate 'create table x as select * from y';
4 end;
5 /
PL/SQL procedure successfully completed.
_______________________________________________________________________
Odomos - the only mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&w
n
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Any views or opinions are solely those of the author and do not necessarily
represent those of Channel Four Television Corporation unless specifically
stated. This email and any files transmitted are confidential and intended
solely for the use of the individual or entity to which they are addressed.
If you have received this email in error, please notify
[Email Address Removed]Oracle LazyDBA home page