oracle – 防止SPOOL的输出被包装
发布时间:2021-03-16 06:05:06 所属栏目:百科 来源:网络整理
导读:我正在尝试使用SQLPLUS中的SPOOL命令为数据库中的对象生成所有DDL SET trimspool ONSET wrap offSET heading offSET linesize 300SET echo offSET pages 999SET long 90000Col object_type format a10000Col object_name format a10000Col owner format a1
我正在尝试使用SQLPLUS中的SPOOL命令为数据库中的对象生成所有DDL SET trimspool ON SET wrap off SET heading off SET linesize 300 SET echo off SET pages 999 SET long 90000 Col object_type format a10000 Col object_name format a10000 Col owner format a10000 spool export.out SELECT DBMS_METADATA.GET_DDL(object_type,object_name,owner) FROM all_OBJECTS WHERE OWNER = 'DMALM' and object_type not like '%PARTITION' and object_type not like '%BODY' and object_type not like '%LOB'; spool off quit 但我得到的输出文件是在col#80切割. 解决方法使用word_wrapped怎么样?SET trimspool ON SET heading off SET linesize 300 SET echo off SET pages 999 SET long 90000 set termout off column txt format a121 word_wrapped Col object_type format a10000 Col object_name format a10000 Col owner format a10000 spool export.out SELECT DBMS_METADATA.GET_DDL(object_type,owner)txt FROM all_OBJECTS WHERE OWNER = 'DMALM' and object_type not like '%PARTITION' and object_type not like '%BODY' and object_type not like '%LOB'; spool off quit (编辑:海南站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |