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 -> HELP! Create Table in stored procedure??

HELP! Create Table in stored procedure??

From: Charles McDonald <cmcdon12_at_ford.com>
Date: Wed, 25 Oct 2000 10:40:56 +0100
Message-ID: <39F6AAA8.CC70BC95@ford.com>

Hello there all

Could anyone tell me the cause of the following

ERROR at line 1:

ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SYS_SQL", line 239
ORA-06512: at "SYS.DBMS_SQL", line 32
ORA-06512: at "MARGMOD.BUILDENTITYTABLE", line 24
ORA-06512: at line 2

I create a stored procedure to write dynamic SQl using the dbms_sys stuff below

vCursor := dbms_sql.Open_Cursor;
dbms_sql.parse(vCursor, vSQL,dbms_sql.v7); vReturn := dbms_sql.Execute(vCursor);
dbms_sql.close_cursor(vCursor);

now, if I execute the Body of the stored procedure in SQL Plus as an anonymous block, it works. If I create the procedure and call it from SQL Plus it does not work???

Can anyone explain this?

For what it is worth, all the work has been done during one session, so I have access to the stored procedure (having created it) have the required create table rights (which is what I am trying).

Please help Received on Wed Oct 25 2000 - 04:40:56 CDT

Original text of this message

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