0

I am using following script to delimited file using spool in the unix server. I ssh into it using putty and execute the shell script.

Here is shell script:

/oracle/app/oracle/product/19.0.0/dbhome_1/bin/sqlplus -s /nolog<<-EOF

conn user/pass

SET PAGESIZE 0
SET LINESIZE 32000
SET NUMWIDTH 127
SET FEEDBACK OFF

set echo off
set heading off
set headsep off
SET MARKUP CSV ON DELIMITER | quote off
set termout off
spool mc_format.dat
select * from mytable;
spool off
EOF

but I am not able to suppress the rows printing out on the terminal, and eventually on log when I run using cron.

Is there any setting I am missing out?

1 Answer 1

1

Right from the documentation SET TERMOUT OFF

Controls the display of output generated by commands in a script that is executed with @, @@ or START. OFF suppresses the display so that you can spool output to a file without displaying the output on screen. ON displays the output on screen. TERMOUT OFF does not affect output from commands you enter interactively or redirect to SQL*Plus from the operating system.

So instead of the here document, call the script using one of the start methods mentioned.

Sign up to request clarification or add additional context in comments.

1 Comment

Made it to work by using START quries.sql in my shell script. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.