-- objetos em geral
SELECT DBMS_METADATA.get_ddl(OBJECT_TYPE,OBJECT_NAME,OWNER)--, OWNER
FROM dba_objects
WHERE OBJECT_TYPE = 'INDEX'
AND OBJECT_NAME = 'CTX_DS_CATEGORIA_PRODUTO'

-- índices do ctx
select *--DBMS_METADATA.get_ddl('INDEX',index_NAME,OWNER) 
from dba_indexes where index_name like 'CTX_%'

--ddl tablespaces
SELECT DBMS_METADATA.get_ddl('TABLESPACE',TABLESPACE_NAME)||'/' FROM dba_tablespaces


SELECT OBJECT_TYPE,OBJECT_NAME,OWNER, METADATA
FROM (SELECT OBJECT_TYPE,OBJECT_NAME,OWNER,DBMS_METADATA.get_ddl(OBJECT_TYPE,OBJECT_NAME,OWNER) AS METADATA
                FROM dba_objects
                WHERE OBJECT_TYPE in ('PROCEDURE','FUNCTION') AND 
                OWNER LIKE 'DB%') A
WHERE A.METADATA LIKE '%TRANSACAO%'

hostgator