RE: dbms_metadata.get_ddl Error

  • From: "Baumgartel, Paul" <paul.baumgartel@xxxxxxxxxxxxxxxxx>
  • To: ebadi01@xxxxxxxxx, "Ghassan Salem" <salem.ghassan@xxxxxxxxx>
  • Date: Mon, 15 Oct 2007 11:47:23 -0400

The procedure owner needs the relevant privileges granted directly, not
via a role.
 

Paul Baumgartel 
CREDIT SUISSE 
Information Technology 
Securities Processing Databases Americas 
One Madison Avenue 
New York, NY 10010 
USA 
Phone 212.538.1143 
paul.baumgartel@xxxxxxxxxxxxxxxxx 
www.credit-suisse.com 

 

________________________________

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of A Ebadi
Sent: Monday, October 15, 2007 11:31 AM
To: Ghassan Salem
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: dbms_metadata.get_ddl Error


Here is the exact call and the user calling this procedure has DBA as
well as the procedure owner:
 
select dbms_metadata.get_ddl('INDEX','MY_TAB_IDX5','OPS$ORACLE') into
v_index_info from dual;
 
The ironic thing is a similar select works just fine from SQLPLUS, but
inside the procedure it fails with ORA-31603.
 
Thanks,
Abdul


Ghassan Salem <salem.ghassan@xxxxxxxxx> wrote:

        How are you calling dbms_metadata.get_ddl (i.e. are you passing
the correct schema to it)?
        second, the calling user does have the rights to do this on the
index's schema?
        
        rgds
        
        
        On 10/15/07, A Ebadi <ebadi01@xxxxxxxxx> wrote: 

                We have a procedure which calls dbms_metadata.get_ddl to
get the ddl for an index & this works fine for objects (indexes) owned
by the same user as my procedure.  For all other objects I get the error
below.  I have an SR open with Oracle for several days now, but no
solution has been given.  Any advise would be appreciated.  
                 
                Environment: Oracle 10.2.0.3.0 on Sun Solaris 2.10.
                 
                Here is the error:
                ORA-31603: object "MY_TAB_IDX5" of type INDEX not found
in schema "OPS$ORACLE" 
                 
                Thanks,
                Abdul
                
________________________________

                Be a better Heartthrob. Get better relationship answers
<http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3o
DMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTkl
fMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545433> from
someone who knows.
                Yahoo! Answers - Check it out. 



________________________________

Be a better Globetrotter. Get better travel answers
<http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3o
DMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTkl
fMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469> from
someone who knows.
Yahoo! Answers - Check it out. 

==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================

Other related posts: