1 Reply Latest reply: Feb 7, 2013 6:14 AM by Frank Kulash RSS

    why this_date becoming null in dbms_job

    933417
      Hi ,
      This is how my code looks....

      decalre
      mysql VARCHAR2(1000);
      BEGIN

      mysql :='XXXXXXXXXXXX';

      DBMS_JOB.submit (jobno, 'begin ' || mysql || '; end;');

      commit;

      END;

      Using mysql I m invoking a procedure.When I am executing above block , jobs are getting inserted into dbms_jobs.
      But they are not getting executed.In user_jobs table, this_date column is going as NULL.

      ANy suggestions please
        • 1. Re: why this_date becoming null in dbms_job
          Frank Kulash
          Hi,
          930414 wrote:
          Hi ,
          This is how my code looks....

          decalre
          mysql VARCHAR2(1000);
          BEGIN

          mysql :='XXXXXXXXXXXX';

          DBMS_JOB.submit (jobno, 'begin ' || mysql || '; end;');

          commit;

          END;

          Using mysql I m invoking a procedure.When I am executing above block , jobs are getting inserted into dbms_jobs.
          But they are not getting executed.In user_jobs table, this_date column is going as NULL.
          If you're getting any results other than error messages, then I don't believe you're really running this code.
          DECLARE is mis-spelled, and jobno is not declared.
          ANy suggestions please
          Post a complete test script that people can run to re-create the problem and test their ideas. Include the CREATE PROCEDURE code for XXXXXXXXXXXX, and some code that checks whether the procedure ran or not.

          Why are you using dbms_jobs?
          If you want to run a procedure over and over (say, once a day), or at a particular time, then use dbms_scheduler.
          If you want to run the procedure just once, right away, then just run the procedure. Don't botherr with either dbms_jobs or dbms_scheduler.