Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus : How to turn off output to terminal ?
A related question... When using SQL*PLUS under WIndows 95, each query results in an annoying popup which simply states the obvious (Query in progress). Anybody know of any way to suppress this?
Jerry Apfelbaum wrote:
>
> > On 28 Feb 1997 12:59:56 -0600, aak2_at_Ra.MsState.Edu (Atif Ahmad Khan)
> > wrote:
> > >How do I turn off output to terminal sqlplus from a select statement when I
> > >am spooling the result to a text file ?
> > >I have tried echo off, feedback off etc. but nothing seems to work.
> > >The problem is not easy to handle when the result is huge and I am
> > >over a modem connection.
> >
> > Have you tried " set flush off" ?
> >
> > rgrds Kari
>
> The option to use is: set termout off
>
> There are some restrictions, though. 'set termout off' will only work
> if you are running an external SQL script (eg, start sqlscript.sql). It
> does not work for an interactive query from the keyboard.
>
> Furthermore, if you are using UNIX and the SQL is in an in-line redirect
> (aka, a here document), then 'set termout off' will not work either
> because SQL*Plus still thinks it is interactive input. The following is
> a simple example of such a case:
>
> sqlplus -s username/password << endOfSQL
> set termout off
> select * from emp;
> endOfSQL
>
> In the above UNIX script, the 'set termout off' will NOT stop output to
> standard output. This is because UNIX passes the 'SQL script' to
> SQL*Plus as if it were interactively input through the keyboard. One
> way I have used to get around this is to pipe the output of the
> SQL*Plus, such as:
>
> sqlplus -s username/password << endOfSQL | grep -E "^ORA-|^ERROR"
> select * from emp;
> endOfSQL
>
> In the above example, your terminal would only show you Oracle error
> lines. Other variants are obviously possible according to your needs.
>
> Hope this helps.
>
> =================================================
> Jerry Apfelbaum email: japfelba_at_ican.ca
> Eastern Sun Group Inc. phone: 416.769.8738
> Toronto, Canada fax: 416.769.7428
Received on Thu Mar 13 1997 - 00:00:00 CST
![]() |
![]() |