Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

spool set option or sh command?

851698Jun 8 2011 — edited Jun 8 2011
I have a unix shell script that among other things spools large files to an output directory. I send certain things in my shell to a log file.
ldate=`date +%Y%m%d`
log='output1_'$ldate

echo '(1) EXPORT OUTPUT1' >> $log
sqlplus -s $user1/$pswd1@$db1 @$sql_dir'output1.sql'

I execute my shell by typing:
nohup sh export_files.sh &

If there is some kind of Oracle error it goes to nohup.out but the problem is so does the output I am spooling and they are large files.

My sql file uses the following options:

set pagesize 0
set trimspool on
set linesize 4000
set echo off
set verify off
set serveroutput off
set feedback off
set long 4000
set wrap off

spool /home/user/output_files/output1.csv

Is there an additional set option that I need in order to stop the spools from going to nohup or would this be a shell command?

Thank you,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2011
Added on Jun 8 2011
2 comments
613 views