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 in Dynamic PL/SQL

DDL in Dynamic PL/SQL

From: Dick Willis <rmw_at_synchrony.com>
Date: 1997/10/22
Message-ID: <01bcdec2$456fae60$0600a8c0@rmw>#1/1

Trying to create a table that I don't know the name of a priori. I am therefore using Dynamic PL/SQL in my procedure to perform the CREATE TABLE function.

Procedure compiles fine ...

Pseudo code is:  

   Get table name
   Build SQL string
   Open cursor with DBMS_SQL.OPEN_CURSOR    Parse SQL statement for cursor DBMS_SQL.PARSE    Execute on cursor DBMS_SQL.EXECUTE

Problem is that when procedure is called, it fails at the .PARSE step with an 'insufficient privilege' error.

Any clues? Am creating the function in an account with the DBA role assigned. Also calling it from the same account, so I thought I had the privileges nailed. Same code with UPDATE, SELECT, etc. works OK. Seems to be solely due to DDL SQL call.

-- 
Dick Willis, Senior Engineer
Synchrony Industrial Controls, Inc.
rmw_at_synchrony.com
http://www.synchrony.com
Received on Wed Oct 22 1997 - 00:00:00 CDT

Original text of this message

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