Link to home
Create AccountLog in
Avatar of vinit_kumar_chawla
vinit_kumar_chawla

asked on

I want to suppress all terminal output generated by Oracle / SQL when I run a query that resides in a ksh script. This is because this is a crontab run and everything is spooled to files anyway.

I want to suppress all terminal output generated by Oracle / SQL when I run a query that resides in a ksh script.  This is because this is a crontab run and everything is spooled to files anyway.

I do not have even the select results to be printed on the console.

Please suggest.
set heading off
set autoprint off
set long 500
set linesize 5000
set pagesize 0
set echo off
set feedback off
#set trimspool on
 
spool temp_name
 
select LOGIN

Open in new window

Avatar of sventhan
sventhan
Flag of United States of America image

Please add

set term off
Avatar of DrSQL - Scott Anderson
vinit_kumar_chawla,
    Make sure your sqlplus command includes the -s (silent) option:

sqlplus -s user/pwd@db @startscript

Good luck!
Avatar of vinit_kumar_chawla
vinit_kumar_chawla

ASKER

sqlplus -s : Its already there. I wnat to spool some data and in the shell script I have the select query, but I want that the result of select query should not be visible on the screen , since I need to run the query in Production and there would be lots of record.

Please suggest.
sventhan showed you the command "set termout off" - that will do it. Put it as the first line of your sqlplus script.

Good luck!
Set termout off
set term off

both are there in the script. Still its showing the Sql select results.
Please post the entire script.
ASKER CERTIFIED SOLUTION
Avatar of Devinder Singh Virdi
Devinder Singh Virdi
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer