Oracle SQL Developer is able to export DDL through
Tools -> Database Export... This works very well, but requires manual intervention.
I know of
DBMS_METADATA.get_ddl(), but have found that the export isn't perfect. I ran into issues where the exported
DBMS_METADATA DDL wasn't usable without first fixing up problems like breaks in the middle of a keyword, and worse. However, if anyone knows a way of exporting DDL through
DMBS_METADATA that can run without manual fixes, that'd be a great solution too.
Basically, I am looking for an automatic/scriptable way to export DDL identical to what is exported through the manual way.
How can I do that?