Issue "set role none" and then see if you can do it in
SQL Plus. This mimics the privs that you have within
a procedure - ie roles are not activated. You
probably need the 'create table' priv granted directly
(or select on the one you're reading from)
hth
connor
- Charlie Mengler <charliem_at_mwh.com> wrote: >
Solaris V2.6 Oracle V8.1.8
>
> Previously I logged in as username "HR" & did
> SQL> GRANT SELECT ON EMPHEADER_MASTER TO BCM;
>
> Within a PL/SQL package the following lines exits.
>
> EXECUTE IMMEDIATE 'TRUNCATE TABLE HR_EMP';
> EXECUTE IMMEDIATE 'DROP TABLE HR_EMP';
> EXECUTE IMMEDIATE 'CREATE TABLE HR_EMP TABLESPACE
> USERS STORAGE ( INITIAL 128K NEXT 128K)
> UNRECOVERABLE
> AS SELECT * FROM
> HR.EMPHEADER_MASTER';
>
> The procedure bombs with ORA-01031: insufficient
> privileges on the CTAS line.
> I (schema BCM) own the procedure & execute it.
> I can manually (from SQL*PLUS) successfully cut,
> paste & run the CREATE TABLE ... AS...
>
> Any advice on how to make the error go away & get
> the table created
> would be greatly appreciated
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Charlie Mengler
> INET: charliem_at_mwh.com
>
> 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).
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)
"Some days you're the pigeon, some days you're the statue"
Do You Yahoo!?
Get your free @yahoo.co.uk address at
http://mail.yahoo.co.uk
or your free @yahoo.ie address at
http://mail.yahoo.ie
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: hamcdc_at_yahoo.co.uk
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 Thu Mar 29 2001 - 02:29:30 CST