2 Replies Latest reply: Oct 22, 2012 11:43 AM by james. RSS

    How read shell log file using DBMS_SCHEDULER

    james.
      Hi All,

      I am running a shell script file using DBMS_SCHEDULER and it creates couple of log file. I am trying to run other DBMS_SCHEDULER job2 to read current log file written by job1 display on APEX web page. I am using oracle 10g version. Any suggestions are much appreciated.

      Regards
        • 1. Re: How read shell log file using DBMS_SCHEDULER
          770691
          in the filesystem $ORACLE_HOME/scheduler/log
          or
          DBMS_SCHEDULER.GET_FILE

          From the PL/SQL package ref (I think this is 11g though)

          GET_FILE Procedure
          This procedure retrieves a file from the operating system file system of a specified
          host. The file is copied to a destination, or its contents are returned in a procedure
          output parameter.
          This procedures differs from the equivalent UTL_FILE procedure in that it uses a
          credential and can retrieve files from remote hosts that have only a Scheduler agent
          (and not an Oracle Database) installed.
          You can also use this procedure to retrieve the standard output or error text for a run
          of an external job that has an associated credential.
          Syntax
          DBMS_SCHEDULER.GET_FILE (
          source_file IN VARCHAR2,
          source_host IN VARCHAR2,
          credential_name IN VARCHAR2,
          file_contents OUT BLOB);
          DBMS_SCHEDULER.GET_FILE (
          source_file IN VARCHAR2,
          source_host IN VARCHAR2,
          credential_name IN VARCHAR2,
          destination_file_name IN VARCHAR2,
          destination_directory_object IN VARCHAR2,
          destination_permissions IN VARCHAR2 DEFAULT NULL);

          Edited by: Phil on Aug 9, 2012 12:19 PM

          Edited by: Phil on Aug 9, 2012 12:21 PM
          • 2. Re: How read shell log file using DBMS_SCHEDULER
            james.
            Thanks Phil for your suggestion. Some reason I missed this reply. Sorry for my late reply.