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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Problem with DBMS_SQL

Re: Problem with DBMS_SQL

From: Joe Testa <teci_at_the-testas.net>
Date: Fri, 31 Aug 2001 04:38:35 -0700
Message-ID: <F001.0037ED77.20010831044739@fatcity.com>

privs in procedures gotten thru roles dont work, its not supposed to.

get create table privilege granted explicitly to yourself and it will work.

joe
"Dmitriy M. Labutin" wrote:
>
> Dear All
>
> Every time when I try to create table with the DBMS_SQL I get error
> -----------
> ORA-01031: insufficient privileges
> ORA-06512: at "SYS.DBMS_SYS_SQL", line 782
> ORA-06512: at "SYS.DBMS_SQL", line 32
> ORA-06512: at "DL.SP_CR", line 6
> ORA-06512: at line 2
> -----------
>
> The procedure code is trivial and I call it as
>
> begin
> sp_cr('CREATE TABLE XTTBL(a NUMBER)');
> end;
> /
>
> CREATE OR REPLACE procedure SP_CR(pvi_str VARCHAR2) AS
> cid INTEGER;
> err_code INTEGER;
> begin
> cid := DBMS_SQL.OPEN_CURSOR;
> DBMS_SQL.PARSE(cid, pvi_str, DBMS_SQL.native);
> err_code:=DBMS_SQL.EXECUTE(cid);
> DBMS_SQL.CLOSE_CURSOR(cid);
> END;
> /
>
> What might be wrong here?
>
> Yes, I can try native SQL (I'm running 8i) but code has to be portable to
> the 8.05
>
> Cheers,
> Dimitri
> --

-- 
Joe Testa  
Performing Remote DBA Services, need some backup DBA support?
For Sale: Oracle-dba.com domain, its not going cheap but feel free to
ask :)
IM: n8xcthome or joen8xct
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Joe Testa
  INET: teci_at_the-testas.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Aug 31 2001 - 06:38:35 CDT

Original text of this message

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