Home » Infrastructure » Unix » Turn off output on the terminal for sql script in Unix shell
Turn off output on the terminal for sql script in Unix shell [message #262605] Mon, 27 August 2007 19:45 Go to next message
aliceg
Messages: 29
Registered: July 2007
Location: Los Angeles
Junior Member

I am creating a Unix shell script with below command:

"sqlplus -s stage/stagep@itxp1 @fixture_file.sql;"
where the fixture_file.sql creates the actual flat file from a query.
What can I do to turn off the output from the screen?
I tried everything even importing terminal vt100 but still displays the output which is supposed to spool to a specific location as defined by fixture_file.sql
Any suggestions?
Thanks so much, --Alice
Re: Turn off output on the terminal for sql script in Unix shell [message #262663 is a reply to message #262605] Tue, 28 August 2007 00:56 Go to previous messageGo to next message
Littlefoot
Messages: 18833
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try to include SET TERMOUT OFF into your SQL script? Something like this:
REM test.sql

set termout off
spool test.txt
select table_name from user_tables;
spool off
exit;
This is how it runs:
M:\>sqlplus -s scott/tiger@ora10 @test

M:\>
See? No output to the screen!
Re: Turn off output on the terminal for sql script in Unix shell [message #262987 is a reply to message #262663] Tue, 28 August 2007 13:28 Go to previous message
aliceg
Messages: 29
Registered: July 2007
Location: Los Angeles
Junior Member

Thanks a million times! It worked !!!!
All the best, --Alice
Previous Topic: how can we run sql commands from unix operating systems
Next Topic: need to display sql messages to screen when running from unix shell
Goto Forum:
  


Current Time: Sun Apr 20 17:42:33 CDT 2014

Total time taken to generate the page: 0.04537 seconds