SET echo off;
set pagesize 0;
SET long 500000;
spool GenerateProcedure_Creation.sql
begin
dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'SQLTERMINATOR', true);
dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'PRETTY', false);
end;
SELECT DBMS_METADATA.GET_DDL(u.object_type,u.object_name,u.owner) DDL
from dba_objects u where u.OBJECT_TYPE = 'PROCEDURE' and owner in ('ADMIN');
spool off;
我使用了上面的代码。但是让一些程序被截断了。
答案 0 :(得分:1)
您可以使用设置参数:
set trimspool off
set linesize 100000
set LONG 20000000
set PAGESIZE 0
并最终强制DDL列的类型
column DDL format a50000 --set your own size here
答案 1 :(得分:1)
与上述类似,但调整到最大长度
set trimspool off
set linesize 32000
set long 20000000
set pagesize 0
column ddl format a50000
选择dbms_metadata.get_ddl(&#39; [INDEX | TABLE] &#39; <#39; TABLENAME &#39;,&#39; OWNER &#39;)作为双重
的ddl