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 -> Re: CREATE TABLE in stored procedure

Re: CREATE TABLE in stored procedure

From: <cary_at_nams.net>
Date: 1998/12/09
Message-ID: <74m3pi$5q0$1@nnrp1.dejanews.com>#1/1

Hello,

  Are you sure that you have the explicit CREATE TABLE privilege and not the CREATE TABLE privilege provided via some user role? I'm not sure if this is the problem, but have a look at the USER_SYS_PRIVS view to find out which explicit system privileges you have. Because stored procedures do not invoke roles, it is often necessary to have explicit system privileges. Just a guess.....

Cary

In article <366E5834.AF86A84C_at_solution42.de>,   Sven Heins <Heins.Sven_at_solution42.de> wrote:
> 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);
> 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
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Dec 09 1998 - 00:00:00 CST

Original text of this message

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