I have these files:
========================================
BATCH1.BAT which contains:
@ECHO OFF
d:\oracle\ora81\bin\SQLPLUSW.EXE user/password@orcl1 @d:\dir1\sql_programs\JOB1.sql
========================================
========================================
and JOB1.SQL which contains:
set serveroutput on size 1000000
col x noprint new_value _x
select 'd:\dir2\sql_programs\logs\LOG_' || to_char(sysdate, 'YYYYMMDD') || '.LOG' x FROM DUAL;
column dat1 new_value filename;
spool &_x
execute SCHEMA1.PACKAGE1.PROC1;
spool off;
exit;
========================================
This would create a log LOG_YYYYMMDD.LOG into the directory. This job runs every 10mins everyday.
However, it overwrites the previous file that was created. I wanted to have just 1 file generated for each day. How would I modify the scripts so it would append new log instead of overwritting.
Thanks,
Pzom
========================================
BATCH1.BAT which contains:
@ECHO OFF
d:\oracle\ora81\bin\SQLPLUSW.EXE user/password@orcl1 @d:\dir1\sql_programs\JOB1.sql
========================================
========================================
and JOB1.SQL which contains:
set serveroutput on size 1000000
col x noprint new_value _x
select 'd:\dir2\sql_programs\logs\LOG_' || to_char(sysdate, 'YYYYMMDD') || '.LOG' x FROM DUAL;
column dat1 new_value filename;
spool &_x
execute SCHEMA1.PACKAGE1.PROC1;
spool off;
exit;
========================================
This would create a log LOG_YYYYMMDD.LOG into the directory. This job runs every 10mins everyday.
However, it overwrites the previous file that was created. I wanted to have just 1 file generated for each day. How would I modify the scripts so it would append new log instead of overwritting.
Thanks,
Pzom