Whenever I try to use the dbms_metadata.get_ddl the output is not valid. I think the issue must be terminal related. The docs say use these: SQL> SET PAGESIZE 0 SQL> SET LONG 1000000 SQL> SELECT get_table_md FROM dual; and then shows perfectly formated output. I wonder what editor they used to repair the damage? When I use it there are linebreaks in the middle of strings that produce errors. This thread https://forums.oracle.com/thread/703189 reports using: set pagesize 0 set long 90000 set lines 131 column txt format a121 word_wrapped set longchunksize to 250 This seemed to work a little better, but I feel like it won't on the next object. Tom has this rambling thread: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:30802454515375 Seems like rather a fishing expedition. Is there some magic that just works? TIA -- //www.freelists.org/webpage/oracle-l