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

  • From: Thomas Kellerer <thomas.kellerer@xxxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 05 Oct 2012 15:47:24 +0200


Eriovaldo Andrietta, 05.10.2012 15:42:
> 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;
  
  
Just select from user_objects:

select dbms_metadata.get_ddl('SEQUENCE', object_name)
from user_objects
where object_type = 'SEQUENCE'

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


Other related posts: