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 -> Create table problem using Dynamic Query

Create table problem using Dynamic Query

From: Ach C via DBMonster.com <forum_at_DBMonster.com>
Date: Mon, 05 Sep 2005 09:22:59 GMT
Message-ID: <53E759D6E2A42@DBMonster.com>


Hi all,
 I want to create a temporary table within a stored procedure so I decided to do it using a dynamic query:
[CODE]create or replace procedure p1

as
 begin
 execute immediate 'CREATE GLOBAL TEMPORARY TABLE tt(id number(2))';  end;
/[/CODE] It created successfuly but when I execute that procedure I got:[CODE] SQL> exec p1;
BEGIN p1; END;

*
ERROR at line 1:

ORA-01031: insufficient privileges
ORA-06512: at "SCOTT.P1", line 4
ORA-06512: at line 1[/CODE] While I can create that table using the same user
without any problem!
[B]My question is:[/B]What privilege should I grant to user(minimum of
privileges please! ) to execute that procedure successfuly?  -Thanks
-- 
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums.aspx/oracle/200509/1
Received on Mon Sep 05 2005 - 04:22:59 CDT

Original text of this message

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