1 2 Previous Next 17 Replies Latest reply on Feb 6, 2013 11:59 AM by 989463 Go to original post
      • 15. Re: DBMS scheduler
        Hi Osama,

        Wait, I run first the above and test while you are still there :)

        Just a clarification:

        Your batch code is
        dbms_scheduler.create_job (
        job_name =>'DROP_DB_LINK',
        job_type =>'executable',
        job_action => '<PATH>.bat >',
        start_date      => SYSTIMESTAMP,
         repeat_interval => freq=daily; byhour=0; byminute=0; bysecond=0;
        enabled => true,
        While Veeresh code is
        job_name => 'refresh_link',
        job_type => 'EXECUTABLE',
        job_action => 'C:\WINDOWS\system32\cmd.exe',
        start_date => SYSTIMESTAMP,
        repeat_interval => 'freq=daily; byhour=0; byminute=0; bysecond=0',
        number_of_arguments => 2,
        end_date => NULL,
        enabled => TRUE,
        comments => 'refresh db links');
        job_name => 'refresh_link', argument_position => 1, argument_value => '/c');
        job_name => 'refresh_link', argument_position => 2, argument_value => '"d:\RefreshDblink.bat"');
        Your job action is ==== > '<PATH>.bat >' ## does it refers to d:\RefreshDblink.bat?

        Veeresh has =====> 'C:\WINDOWS\system32\cmd.exe' ## is this default or mandatory as I am running a windows .bat as the type of exe?

        Which job_action is correct?

        • 16. Re: DBMS scheduler
          Thanks veeresh :D that is better and clearly explained.
          • 17. Re: DBMS scheduler
            Hi All,

            I have an issue related to logging date written by a maintenance window job.
            Job is a nightly job scheduled to run at 2:00 AM

            A log file is created from this Job run.
            Timestamp is written into this log file using UTL_FILE.PUT_LINE(log_file,TO_CHAR(SYSDATE,'DD/MM/YYYY HH24:MI:SS'))

            when i do "ls -l logfile" , the correct time is shown ( 2:00 AM )
            but when i open logfile and view timestamp written with SYSDATE, wrong time is seen ( 14:00 etc..)

            could someone tell what could be wrong ?
            Oracle release is ( system is Unix 32 bit )

            P.S.- I am replying on this thread as i don't know how to create a new thread
            1 2 Previous Next