RE: How to get all names of specific object - DBMS_METADATA
Date: Fri, 5 Oct 2012 13:51:20 +0000
Message-ID: <DF78EADE484D37419A53F5C898629DB72E56667E_at_USMAIL2K1001.us.micros.int>
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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] 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
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 05 2012 - 15:51:20 CEST