4 Replies Latest reply: Jan 23, 2013 1:04 AM by Mihael RSS

    SPOOL Log file File to Local Drive with prefixing system date?

    user10636796
      Hi, Everyone,

      I am using oracle 11.1.0.6 version.

      I am trying to run my pl/sql package using a control script which uses a spool to write a log file to my local drive. While executing i am getting an error saying invalid file name.

      could anyone please help?


      SET SERVEROUTPUT ON;

      SPOOL c:\||TO_CHAR(SYSDATE,'DD/MM/YYYY HH24:MI')||'_rlv.log' APPEND;

      SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY hh24:mi') FROM DUAL;

      EXEC PAC_RLV.CALL_ALL();

      SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY hh24:mi') FROM DUAL;


      I need the sysdate as the prefix for my log file.

      Thanks in advance