- 论坛徽章:
- 0
|
请问各位高手:
我在用crontab时遇到以下问题请指教:
18 16 * * * /bin/ksh /df8003/bat/autodbpara
autodbpara是一个ksh程序,里边有sqlplus等操作,请看:
...
...
sqlplus $BAK_USER/$BAK_PASSWORD@$BAK_SERVER >; /dev/null << EOF
set heading off;
set pagesize;
set linesize 200;
set trimspool on;
set feed off;
set sqlp #;
set sqln off;
spool $DAE_TMP_DIR/out_para.sh;
select case
when rownum = 1 then 'exp userid=$BAK_USER/$BAK_PASSWORD@$BAK_SERVER file=$BAK_FILE tables='
when rownum >; 1 then ' tables='
end || trim(table_name) || ' \'
from user_tables
where tablespace_name = 'DFSYS' and temporary != 'Y';
spool off;
quit;
EOF
结果是,此shell确实运行,但
out_para.sh文件没有生成,不知道什么原因?请指教! |
|