Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> DDL in Dynamic PL/SQL
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.comReceived on Wed Oct 22 1997 - 00:00:00 CDT