Getting DDL for all oracle objects
J1604Jun 8 2012 — edited Jun 8 2012I am working to get the DDL for all the oracle objects within my schema.
Some how I got the DDL but I can't got the comments associated with the oracle tables.
Shall I know what I am missing in using dbms_package I am currently using ..?
Below is the sql I am using to get DDL
SELECT dbms_metadata.get_ddl(replace(OBJECT_TYPE, ' ', '_'), OBJECT_NAME,OWNER)
FROM DBA_OBJECTS
WHERE OBJECT_TYPE in ('SEQUENCE',
'PROCEDURE',
--'DATABASE LINK',
'PACKAGE',
'PACKAGE BODY',
'MATERIALIZED VIEW',
'TABLE',
'INDEX',
'VIEW',
'FUNCTION')
AND
OWNER = 'Schema_1';
Can I know what needs to be changed to above sql to get comments on oracle tables along with their DDL.
Any advise is highly appreciated.
Thanks
JP