Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Please help: create table with NDS PL/SQL.

Please help: create table with NDS PL/SQL.

From: Ario Mihardja <ario3_at_earthlink.net>
Date: Sun, 06 Oct 2002 18:46:43 GMT
Message-ID: <ny%n9.11734$OB5.1220249@newsread2.prod.itd.earthlink.net>


Hi Readers,

Subject: Execute DDL and DML with PL/SQL.

I want to create a table called 'Dummy' within a procedure 'Temp'. The procedure got created. However, the table didn't get created. I executed the procedure 'Temp', but I got 'insufficient privileges' error. Anyone can tell me what could be the problem here? I am using Oracle 8i. How to do it properly so I know the table gets created?
Thank you in advance for your help.

Have a nice day,
Ario Mihardja.



SQL>CREATE OR REPLACE PROCEDURE Temp IS
  2 BEGIN
  3 EXECUTE IMMEDIATE 'CREATE TABLE Dummy ( I INTEGER )';   4 END Temp;
  5 /

Procedure created.

SQL> desc Dummy;
ERROR:
ORA-24372: invalid object for describe

SQL> drop table Dummy;
drop table Dummy

           *
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> execute scott.temp;
BEGIN scott.temp; END;

*

ERROR at line 1:

ORA-01031: insufficient privileges
ORA-06512: at "SCOTT.TEMP", line 3
ORA-06512: at line 1


SQL> declare
  2 begin
  3 Temp;
  4 end;
  5 /
declare
*

ERROR at line 1:

ORA-01031: insufficient privileges
ORA-06512: at "SCOTT.TEMP", line 3
ORA-06512: at line 3


SQL> execute temp;
BEGIN temp; END;

*

ERROR at line 1:

ORA-01031: insufficient privileges
ORA-06512: at "SCOTT.TEMP", line 3
ORA-06512: at line 1


SQL> spool off;


Received on Sun Oct 06 2002 - 13:46:43 CDT

Original text of this message

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