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: Jared Still <jkstill_at_gmail.com>
Date: Mon, 15 Oct 2007 13:07:08 -0700
Message-ID: <bf46380710151307y6537a7f1ve570732f2a2844ae@mail.gmail.com>


On 10/15/07, A Ebadi <ebadi01_at_yahoo.com> wrote:
>
>
> Tried to give select_catalog_role with authid current_user, but doesn't
> work as need lots of privs for the executing user like drop any index,
> select any table, etc.
>

If using the DBA role didn't work, granting SELECT_CATALOG_ROLE isn't going to help.

What we are looking for is a simple procedure that allows users to drop an
> index, but saves the index re-create ddl before dropping it.
>

Just tested you exact scenario.

ORA-31603 will occur unless the user running the procedure has explicitly granted
SELECT on the table in question.

Not sure why Oracle support has not gotten back to you. It takes < 5 minutes to setup a user and test this.

Any other suggestions?
>

Yes, use Perl.

Specifically, Perl with the Oracle::DDL module.

Or just use dbms_metadata from a SQL script, and generate and run the SQL.

Or run the procedure as sysdba.

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

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

Original text of this message

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