RE: How to get all names of specific object - DBMS_METADATA

  • From: "Uzzell, Stephan" <SUzzell@xxxxxxxxxx>
  • To: "'ecandrietta@xxxxxxxxx'" <ecandrietta@xxxxxxxxx>, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 5 Oct 2012 13:51:20 +0000

How about a simple:

select dbms_metadata.get_ddl( 'SEQUENCE', sequence_name, sequence_owner ) from 
dba_sequences where...

Stephan Uzzell

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Eriovaldo Andrietta
Sent: Friday, 05 October, 2012 09:43
To: ORACLE-L
Subject: How to get all names of specific object - DBMS_METADATA

Hi Friends,
I have the following situation: I want to retrieve all sequences , or all 
synonyms without specify each sequence name or synonym name using 
DBMS_METADATA.get_ddl.

This does not work. I need to specify the sequence name.

SELECT DBMS_METADATA.GET_DDL('SEQUENCE','*') FROM DUAL;


I would like to retrieve all sequences and don´t do it:

   FOR l in (SELECT sequence_name objname
               FROM user_sequences)
    LOOP
  vobjname := l.objname;
      SELECT DBMS_METADATA.GET_DDL('SEQUENCE',vobjname) INTO vddl FROM DUAL;
    END LOOP;


Any experience with this command ?

Regards
Eriovaldo

--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: