Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CREATE TABLE in stored procedure
Sven Heins schrieb:
>
> Hi,
>
> I'd like to create a table in a package or stored procedure with dynamic
> SQL using DBMS_SQL package.
>
> Problem:
> I have rights to create a table and I can use the coding in an anonymous
> PL/SQL block (with the same USER connected to the database) but I can't
> execute a procedure with this coding successfully.
> The owner of the procedure is the same USER and the execution of the
> procedure is made with this USER but I have still right problems!!!
>
> What is wrong???
>
> Here's the coding:
>
> ...
> nCursor := DBMS_SQL.OPEN_CURSOR;
> cStatement := 'create table s_dummy (ID number NOT NULL, NAME
> VARCHAR2(50) ) ' ||
> 'tablespace TBSPACE_TEST (initial 1 M next 100 K )';
> DBMS_SQL.PARSE(nCursor , cStatement, dbms_sql.native);
could it be that you forgot the following:
v_NumRows := DBMS_SQL.EXECUTE(nCursor);
> DBMS_SQL.CLOSE_CURSOR(nCursor);
> ...
>
> Thanks for any help!
>
> Sven Heins
>
> solution42 IT systems & consulting Gmbh & Co KG
> Ernst-Abbe-Str. 10
> 25451 Quickborn / Germany
>
> Tel: +49 4106 768165
> Fax: +49 4106 768199
> Email: Heins.Sven_at_solution42.de
> WWW: www.solution42.de
or is there any ERROR-Messaging?
Reinhard
-- ---------------------------------------------------- E-Mail_at_work: mailto:wahl_at_zv.fhg.de E-Mail_at_home: mailto:ReinhardWahl_at_online.de ---------------------------------------------------- Website http://www.online.de/homepages/ReinhardWahl ---------------------------------------------------- Hiermit widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder Meinungsforschung gemaess Par. 28 Abs. 3 Bundesdatenschutzgesetz. ---------------------------------------------------- Please do not use my E-Mail address for advertising! ----------------------------------------------------Received on Wed Dec 09 1998 - 00:00:00 CST