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 -> getting junk out of spool file

getting junk out of spool file

From: Nathan <Nathan_member_at_newsguy.com>
Date: 16 Apr 2001 08:56:32 -0700
Message-ID: <9bf4ng02qfk@drn.newsguy.com>

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 Received on Mon Apr 16 2001 - 10:56:32 CDT

Original text of this message

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