Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Capturing script output (without the junk)
If you are using Oracle 9 or 10, you can use dbms_metadata.get_ddl as
in
select dbms_metadata.get_ddl('SEQUENCE','MYSEQ','SCOTT') from dual;
You will want to set long and set pagesize to some large number. One good things about doing it the way you are currently doing it, is that it allows you to programatically change some of the values (ie reset next value to 1, for example).
To eliminate more unwanted stuff from your spool file,
put your sql statement in a file, and add the following at the top of
the file;
set echo off
set feedback off
set pagesize 0
set linesize 999
set verify off
spool ...
Select 'Create ...
...
spool off
set echo on
HTH Received on Wed Sep 28 2005 - 11:01:29 CDT
![]() |
![]() |