Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sqlplus : How to turn off output to terminal ?

23,173 views
Skip to first unread message

Atif Ahmad Khan

unread,
Feb 28, 1997, 3:00:00 AM2/28/97
to

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.

Thanks.

Atif Khan
aa...@ra.msstate.edu

Bosse Melin

unread,
Feb 28, 1997, 3:00:00 AM2/28/97
to

To turn of terminal output use:
set termout off

Best regards

Bosse Melin, Sweden
bosse...@gislaved.mail.telia.com

Atif Ahmad Khan <aa...@Ra.MsState.Edu> skrev i inlägg
<aak2.85...@Isis.MsState.Edu>...

AlexJent

unread,
Mar 1, 1997, 3:00:00 AM3/1/97
to

You can't(dont' want) to do that. The only way for data to get to the
file there must be output from running your script.

However, if you are in a UNIX environment you can redirect the output to
the null device while you spool to a file. This will avoid collecting
massive amounts of data in log files etc.

Good luck.


Alex Jentilucci - Consultant
Information System Dynamics, Inc
Minneapolis, MN 55323
Tele: 612-476-7395 FAX: 612-473-5954 E-Mail: inf...@aol.com

E-Mail Work: jenti...@notes.seagate.com
Home: Alex...@aol.com


John Morrison

unread,
Mar 1, 1997, 3:00:00 AM3/1/97
to

try:
set termout off

Atif Ahmad Khan <aa...@Ra.MsState.Edu> wrote in article

Jorma Tirkkonen

unread,
Mar 1, 1997, 3:00:00 AM3/1/97
to


I make file d:\temp\test.sql as

set echo off
set termout off
spool d:\temp\test.txt
select * from dict;
spool off
set termout on
set echo on

and then I ran it from sqlplus like

SQL> @d:\temp\test.sql

and "termout off" don't stop spooling result to file.

(Windows NT platform and SqlPlus 3.3)

Best regards Jorma

Dave Macpherson

unread,
Mar 3, 1997, 3:00:00 AM3/3/97
to

Actually, that is not correct. You can SET TERMOUT OFF and still spool
the output to a file.

Dave

janet

unread,
Mar 3, 1997, 3:00:00 AM3/3/97
to

Atif Ahmad Khan <aa...@Ra.MsState.Edu> skrev i inlägg
<aak2.85...@Isis.MsState.Edu>...
>
> How do I turn off output to terminal sqlplus from a select statement when I
> am spooling the result to a text file ?

AlexJent wrote:
>
> You can't(dont' want) to do that. The only way for data to get to the
> file there must be output from running your script.

Not my understanding.

set termout off
spool spoolfile.lst
select * ...
spool off

and your spool file contains the select data.

janet

Kari Pannila

unread,
Mar 5, 1997, 3:00:00 AM3/5/97
to

On 28 Feb 1997 12:59:56 -0600, aa...@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

Brian Motzer

unread,
Mar 7, 1997, 3:00:00 AM3/7/97
to

Use set termout off

AlexJent

unread,
Mar 8, 1997, 3:00:00 AM3/8/97
to

If you are running on a unix platform, I would suggest NOT running your
script from within SQLPLUS when spooling large data but run from the unix
prompt.

IE: sqlplus -s username/password @yourscript.sql > spooldata.txt

Actually with this method, you should not have a "spool" statement in your
script.

If you are not on a unix platform....I'll be looking at responces you
receive....

Jerry Apfelbaum

unread,
Mar 9, 1997, 3:00:00 AM3/9/97
to

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: japf...@ican.ca
Eastern Sun Group Inc. phone: 416.769.8738
Toronto, Canada fax: 416.769.7428

Richard J Woodland

unread,
Mar 13, 1997, 3:00:00 AM3/13/97
to

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?

KJPhilbr13

unread,
Mar 18, 1997, 3:00:00 AM3/18/97
to

Try "set term off"...

Regards,
Kevin

Mark Killick

unread,
Mar 24, 1997, 3:00:00 AM3/24/97
to

In message <19970318131...@ladder01.news.aol.com>
kjphi...@aol.com (KJPhilbr13) writes:

> Regards,
> Kevin

or when invoking sqlplus with input coming from a script 'sqlplus -s'

regards,
Mark Killick

Keith/Loo Yah

unread,
Mar 25, 1997, 3:00:00 AM3/25/97
to Kari Pannila

Kari Pannila wrote:
>
> On 28 Feb 1997 12:59:56 -0600, aa...@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
Try set term off.
That should do the trick.
Cheers!

Keith

k.srilat...@gmail.com

unread,
May 30, 2014, 4:37:38 PM5/30/14
to
That dint work. I have the same issue. Any other way to turn it off?

ddf

unread,
Jun 2, 2014, 9:20:06 AM6/2/14
to
On Friday, May 30, 2014 2:37:38 PM UTC-6, k.srilat...@gmail.com wrote:
> That dint work. I have the same issue. Any other way to turn it off?

Then show us what you are doing. Simply saying 'that dint work' (and you REALLY should use PROPER ENGLISH, not this chat-speak crap) doesn't do anyone any good in providing any useful information to diagnose your 'problem'.


David Fitzjarrell

pravesh...@paytm.com

unread,
Jun 27, 2014, 3:06:28 AM6/27/14
to
You All sucked nobody having understand of practical.There is no working Termout off to disappearing query output on terminal.search other method in linux.

joel garry

unread,
Jun 27, 2014, 11:33:58 AM6/27/14
to
On Friday, June 27, 2014 12:06:28 AM UTC-7, pravesh...@paytm.com wrote:

> You All sucked nobody having understand of practical.There is no working Termout off to disappearing query output on terminal.search other method in linux.

You're funny.

Do you not understand how old this thread is? What kind of strange access do you have to usenet? Have you any idea who the people are here? Do you have any idea what this group is about? Were you even born when it was created? Did Oracle run on linux when this thread was started?

See http://www.dbaoracle.net/readme-cdos.htm

jg
--
@home.com is bogus.
http://news.softpedia.com/news/Oracle-Linux-7-0-RC-Uses-XFS-Filesystem-and-Has-UEFI-Support-448681.shtml

cnea...@itree.com.au

unread,
Jul 25, 2014, 12:43:36 AM7/25/14
to
Just piping to /dev/null works fine:

sqlplus -s username/password << endOfSQL > /dev/null

suho...@gmail.com

unread,
Oct 6, 2017, 5:41:44 PM10/6/17
to
On Friday, February 28, 1997 at 3:00:00 AM UTC-5, 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.
>
> Thanks.
>
> Atif Khan
> aa...@ra.msstate.edu


This is interesting topic. I found it today. hope it is useful.
sqlplus "%usr_name%/%pass%@%db" @sqlscript.sql > suppressed.out


Suntan

unread,
Oct 11, 2017, 5:46:04 PM10/11/17
to
As Suhong said, run it as a batch command with redirected output. If
you need to, you can check on progress by connecting periodically and
doing "tail -f suppressed.out". If you don't know if a result will be
huge, connect via a utility or system that can junk terminal output yet
still allow a "spool wanted.out". In an academic environment you may
have VMS. Connect through VMS and type Ctrl-O (a second one resumes o/p).

VAXman-

unread,
Oct 11, 2017, 6:33:49 PM10/11/17
to
In article <pan.2017.10...@example.com>, Suntan <nos...@example.com> writes:
>On Fri, 06 Oct 2017 14:41:42 -0700, suhong.it wrote:
>
>> On Friday, February 28, 1997 at 3:00:00 AM UTC-5, Atif Ahmad Khan wrote:
------^^^^^^^^^^^^^^^^^^^^^^^^^^

Dr. Tony Newman and Dr. Doug Phillips have once again been transported
through time via The Time Tunnel.

--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.

Suntan

unread,
Oct 28, 2017, 3:44:17 PM10/28/17
to
On Wed, 11 Oct 2017 22:33:46 +0000, VAXman- wrote:

> In article <pan.2017.10...@example.com>, Suntan
> <nos...@example.com> writes:
>>On Fri, 06 Oct 2017 14:41:42 -0700, suhong.it wrote:
>>
>>> On Friday, February 28, 1997 at 3:00:00 AM UTC-5, Atif Ahmad Khan
>>> wrote:
> ------^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Dr. Tony Newman and Dr. Doug Phillips have once again been transported
> through time via The Time Tunnel.

VAXman yes, only saw that afterwards. (No idea how such an old post
crept in).
0 new messages