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: dbms_metadata.get_ddl Error

Re: dbms_metadata.get_ddl Error

From: Nigel Thomas <nigel_cl_thomas_at_yahoo.com>
Date: Mon, 15 Oct 2007 13:07:16 -0700 (PDT)
Message-ID: <134992.69873.qm@web58808.mail.re1.yahoo.com>

From SQL*Plus, as a regular user you can find out what is visible to you using the ALL_xxx family of views (eg ALL_OBJECTS, ALL_TABLES etc). If you want to know how they have been granted to you, try selecting from the (confusingly named, for historical reasons) ALL_TAB_PRIVS_RECD (confusing because it includes all objects) 

eg: 
select grantee, table_name, grantor from all_tab_privs_recd where table_name='DBMS_METADATA'
/

GRANTEE                        TABLE_NAME                     GRANTOR                        
------------------------------ ------------------------------ ------------------------------ 
PUBLIC                         DBMS_METADATA                  SYS                            

If the grant is directly to you - or to PUBLIC (everyone - PUBLIC is not a "normal" role) then you should be able to use the privilege from PL/SQL. If the grant is to a proper role which has itself been granted to you, you won't be able to use the privilege from PL/SQL.

Try the same with your table and index...

Regards Nigel

----- Original Message ----
From: A Ebadi <ebadi01_at_yahoo.com>
To: Robert Freeman <robertgfreeman_at_yahoo.com>; Ghassan Salem <salem.ghassan_at_gmail.com>

Understand that, but the issue is what grant(s) am I missing?  That's the question Oracle Support can't answer yet either.

Thanks!

Robert Freeman <robertgfreeman_at_yahoo.com> wrote:
Grant to role vs. direct grant? Anytime something
"works from SQL*Plus" but does not work from PL/SQL
that is one of the first questions to ask.

...
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 15 2007 - 15:07:16 CDT

Original text of this message

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