2 Replies Latest reply on Jan 17, 2014 11:00 PM by rp0428

    DBMS_SCHEDULER.CREATE_JOB executing a shell script

    rajvid


      Hi ,

       

      Shell script :-  TEST.ksh

      #!/bin/ksh

      dhxmlfile=`date +"%Y-%j-%R"`

      dhoriginfile= /A/XMLFirstTest.xml

      dhdestinationfile=/A/B

      cp $dhoriginfile $dhdestinationfile/$dhxmlfile

      rm $dhoriginfile

       

      BEGIN
      DBMS_SCHEDULER.CREATE_JOB

      (job_name=>'TEST.ksh',

        job_type=>'EXECUTABLE',

      JOB_ACTION=>'/A/TEST.ksh',

      Start_date=> SYSDATE,

      job_class=> 'DEFAULT_JOB_CLASS',

      Enabled=> TRUE,

      auto_drop=> TRUE,

      Comments=> 'Run shell-script Test.ksh');

      Exception

      WHEN others then

      DBMS_OUTPUT.PUT_LINE

      (SQLCODE||SQLERRM);

      end;

       

      Getting an error :-

      ORA-27369: job of type EXECUTABLE failed with exit code: 274662

      STANDARD_ERROR="Oracle Scheduler error: Config file is not owned by root or is writable by group or other or extjob is not setuid and owned by root"

       

      Can anyone help me with this