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 -> DDL statement in Stored Procedure.

DDL statement in Stored Procedure.

From: Manish <manish1000_at_hotmail.com>
Date: 8 Apr 2002 14:02:56 -0700
Message-ID: <9d90ea9a.0204081302.efe7149@posting.google.com>


Hi

I was trying to create a table (Dynamic DDL) thru a stored procedure as the name of the table will be known at run-time as the following :

CREATE OR REPLACE PROCEDURE TESTPROC

 ( L_TIND	INTEGER ) AS
  L_SQL		VARCHAR2 (2000);  L_TABLENAME	VARCHAR2 (25);
BEGIN
 L_TABLENAME := 'TBL_' || TO_CHAR( L_TIND );  L_SQL := 'CREATE TABLE ' || L_TABLENAME || ' ( RQINDX NUMBER )';  EXECUTE IMMEDIATE L_SQL;
END;
/

It is giving the error message as "ORA-01031: Insufficient Previlidges". When I comment the line containing "EXECUTE IMMEDIATE L_SQL;" then it works. Can any one tell me what type of previlidges are required here?

Any help will be appreciated. Thanks.

Manish Gupta Received on Mon Apr 08 2002 - 16:02:56 CDT

Original text of this message

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