Home » SQL & PL/SQL » SQL & PL/SQL » how to avoid query output when called from shell script
how to avoid query output when called from shell script [message #206712] Fri, 01 December 2006 03:42 Go to next message
sridharreddy_d
Messages: 3
Registered: July 2006
Location: kualalumpur
Junior Member
hi all,
I am starting sql*plus from shell script in order to execute an sql statement in the following way..,

sqlplus -s $pass << END
set pagesize 0 feedback off verify off heading off echo off linesize 100
spool move_to_disk.sh
select 'mv '||name || ' /export/home/oracle/disk2/' from v\$archived_log
where sequence# <= $seq;
spool off;
exit;
END

The select statement output is getting spooled as per requirement but,the select statement output is appearing on stdout when I run the shell script, which I want to avoid.

Can anyone please advice me as to how I can avoid sql statement output to appear on stdout and to only spooled it to file.

Thanks in advance,
Sridhar
Re: how to avoid query output when called from shell script [message #206714 is a reply to message #206712] Fri, 01 December 2006 03:46 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
set termout off
Previous Topic: materialized views
Next Topic: HOW TO SCHEDULE A TASK IN ORACLE
Goto Forum:
  


Current Time: Sat Dec 07 03:11:22 CST 2024