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

Re: DDL in Dynamic PL/SQL

From: Stuart Turton <sturton_at_maderich.demon.co.uk>
Date: 1997/10/23
Message-ID: <344E903B.3ECC9851@maderich.demon.co.uk>#1/1

<HTML>

You need explicit CREATE TABLE permission. Role based permissions don't work.

<P>Dick Willis wrote:
<BLOCKQUOTE TYPE=CITE>Trying to create a table that I don't know the name
of a priori.&nbsp; I am
<BR>therefore using Dynamic PL/SQL in my procedure to perform the CREATE
TABLE
<BR>function.

<P>Procedure compiles fine ...

<P>Pseudo code is:

<P>&nbsp;&nbsp; Get table name
<BR>&nbsp;&nbsp; Build SQL string
<BR>&nbsp;&nbsp; Open cursor with DBMS_SQL.OPEN_CURSOR
<BR>&nbsp;&nbsp; Parse SQL statement for cursor DBMS_SQL.PARSE
<BR>&nbsp;&nbsp; Execute on cursor DBMS_SQL.EXECUTE

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

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

<P>--
<BR>Dick Willis, Senior Engineer
<BR>Synchrony Industrial Controls, Inc.
<BR>rmw_at_synchrony.com
<BR>http://www.synchrony.com</BLOCKQUOTE>
&nbsp;</HTML> Received on Thu Oct 23 1997 - 00:00:00 CDT

Original text of this message

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