Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: getting junk out of spool file

Re: getting junk out of spool file

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 20 Apr 2001 19:01:03 +0800
Message-ID: <3AE016EF.1937@yahoo.com>

Nathan wrote:
>
> Hi All,
>
> I ran the following script on a Sun box 18 months ago using
> Oracle 8.something and it worked great. I run it
> on my PC in sqlplus 8.0.6.0.0 connected to Oracle 8.1.5
> on a Sun and I got errors.
>
> --------------------------------------------------
> set timing off
> set time off
> set feedback off
> set heading off
> set echo off
> ttitle off
> btitle off
> set line 80
> set pages 0
> set recsep off
>
> spool disable_cons.lst
>
> select 'alter table '||TABLE_NAME||' disable constraint '||CONSTRAINT_NAME||';'
> from user_constraints
> where CONSTRAINT_TYPE = 'R'
> order by TABLE_NAME, CONSTRAINT_NAME;
>
> spool off
>
> set feedback on
> set heading on
> set echo on
> set line 80
> set pages 30
>
> start disable_cons.lst
> -----------------------------------------------------
>
> The contents of disable_cons.lst are:
>
> -----------------------------------------------------
> SQL> select 'alter table '||TABLE_NAME||' disable constraint '||
> CONSTRAINT_NAME||';'
> 2 from user_constraints
> 3 where CONSTRAINT_TYPE = 'R'
> 4 order by TABLE_NAME, CONSTRAINT_NAME;
> alter table TRANSFER disable constraint TRANSFER_ALLOCATION_FK;
> SQL> spool off
> -----------------------------------------------------
>
> That explains the errors. How do I turn off the output of the SQL> prompt and
> the stuff I don't need? All I want in my file is:
>
> ------------------------------------------------------
> alter table TRANSFER disable constraint TRANSFER_ALLOCATION_FK;
> ------------------------------------------------------
>
> and a statement for any other constraints (without the ---- of course)
>
> Thanks for any suggestions you can give.
>
> Nathan

Try 'set termout off' or

select blah (no semicolon)
<= deliberate blank line
spool x
/
spool off

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"
Received on Fri Apr 20 2001 - 06:01:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US