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 -> RE: dynamic SQL with DBMS_SQL

RE: dynamic SQL with DBMS_SQL

From: SHO <hos000_at_uleth.ca>
Date: 1997/07/12
Message-ID: <33C831C9.83EC1EBC@uleth.ca>#1/1

Hi ,
I am attempting to use DBMS_SQL to dynamically create tables or views. These are my sample codes:

PROCEDURE DYNSQL AS
  cur integer;
  rc integer;
BEGIN
  cur := DBMS_SQL.OPEN_CURSOR;
  DBMS_SQL.PARSE(cur, 'CREATE TABLE X (Y DATE)', DBMS_SQL.V7);   rc := DBMS_SQL.EXECUTE(cur);
  DBMS_SQL.CLOSE_CURSOR(cur);
END; It compiles fine but when I try to run it, I get the following errors:

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 "HUM_WWW00.DYNSQL", line 6
ORA-06512: at line 4

I have usd to select and update using DBMS_SQL dynamically without any problem
I am pretty sure I have privileges create table and views. Would I need higher privs to dynamically create tables or views?

Thanks in advance for your help

SH Received on Sat Jul 12 1997 - 00:00:00 CDT

Original text of this message

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