Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    kualalumpur
    Posts
    89

    Unanswered: how to avoid query output when called from shell script

    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

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Exclamation



    PHP Code:
    SET TERM OFF 

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •