COMPLICATIONS WITH JOB SCHEDULING

This was the table which i created...
CREATE TABLE dummy(Serial NUMBER(6),Moment VARCHAR2(100));
The below is the procedure that i used fro my job on the above table...
CREATE OR REPLACE PROCEDURE dummy_dummy IS
a NUMBER(6):=0;
BEGIN
FOR i IN A..10 LOOP
INSERT INTO dummy VALUES(a,TO_CHAR(SYSDATE,'DD:MON:YYYY:HH24:MI:SS'));
a:=a+1;
END LOOP;
END dummy_dummy;
And, the below is my job coding....
BEGIN
DBMS_SCHEDULER.CREATE_JOB
job_name                  =>  'for_dummy_dummy_proc',
job_type                  =>  'PLSQL_BLOCK',
job_action                =>  'BEGIN dummy_dummy; END;',
start_date                =>  SYSTIMESTAMP,
repeat_interval           =>  'freq=minutely; interval=1;',
end_date                  =>  NULL,
enabled                   =>  TRUE,
comments                  =>  'This JOB is to update dummy values in the DUMMY table'
END;
BEGIN
DBMS_SCHEDULER.RUN_JOB
job_name              =>  'for_dummy_dummy_proc'
END;
Everything went on fine except the first run of the scheduling....
At 49 minute... it ran two times at 23 rd and 28 th.
But, then after it ran fine once a minute on every 23 rd second. Why am I facing this problem????
The output is as below.
8
14:NOV:2013:15:55:23
9
14:NOV:2013:15:55:23
0
14:NOV:2013:15:54:23
1
14:NOV:2013:15:54:23
2
14:NOV:2013:15:54:23
3
14:NOV:2013:15:54:23
4
14:NOV:2013:15:54:23
10
14:NOV:2013:15:54:23
8
14:NOV:2013:15:54:23
7
14:NOV:2013:15:54:23
6
14:NOV:2013:15:54:23
5
14:NOV:2013:15:54:23
9
14:NOV:2013:15:54:23
0
14:NOV:2013:15:53:23
1
14:NOV:2013:15:53:23
2
14:NOV:2013:15:53:23
3
14:NOV:2013:15:53:23
4
14:NOV:2013:15:53:23
5
14:NOV:2013:15:53:23
6
14:NOV:2013:15:53:23
7
14:NOV:2013:15:53:23
8
14:NOV:2013:15:53:23
9
14:NOV:2013:15:53:23
10
14:NOV:2013:15:53:23
4
14:NOV:2013:15:52:23
3
14:NOV:2013:15:52:23
2
14:NOV:2013:15:52:23
1
14:NOV:2013:15:52:23
0
14:NOV:2013:15:52:23
5
14:NOV:2013:15:52:23
10
14:NOV:2013:15:52:23
9
14:NOV:2013:15:52:23
8
14:NOV:2013:15:52:23
7
14:NOV:2013:15:52:23
6
14:NOV:2013:15:52:23
0
14:NOV:2013:15:51:23
1
14:NOV:2013:15:51:23
2
14:NOV:2013:15:51:23
3
14:NOV:2013:15:51:23
4
14:NOV:2013:15:51:23
10
14:NOV:2013:15:51:23
6
14:NOV:2013:15:51:23
7
14:NOV:2013:15:51:23
8
14:NOV:2013:15:51:23
9
14:NOV:2013:15:51:23
5
14:NOV:2013:15:51:23
4
14:NOV:2013:15:50:23
3
14:NOV:2013:15:50:23
2
14:NOV:2013:15:50:23
1
14:NOV:2013:15:50:23
0
14:NOV:2013:15:50:23
5
14:NOV:2013:15:50:23
6
14:NOV:2013:15:50:23
7
14:NOV:2013:15:50:23
8
14:NOV:2013:15:50:23
9
14:NOV:2013:15:50:23
10
14:NOV:2013:15:50:23
0
14:NOV:2013:15:49:28
1
14:NOV:2013:15:49:28
10
14:NOV:2013:15:49:28
9
14:NOV:2013:15:49:28
8
14:NOV:2013:15:49:28
7
14:NOV:2013:15:49:28
6
14:NOV:2013:15:49:28
5
14:NOV:2013:15:49:28
4
14:NOV:2013:15:49:28
3
14:NOV:2013:15:49:28
2
14:NOV:2013:15:49:28
0
14:NOV:2013:15:49:23
9
14:NOV:2013:15:49:23
8
14:NOV:2013:15:49:23
7
14:NOV:2013:15:49:23
6
14:NOV:2013:15:49:23
10
14:NOV:2013:15:49:23
4
14:NOV:2013:15:49:23
3
14:NOV:2013:15:49:23
2
14:NOV:2013:15:49:23
1
14:NOV:2013:15:49:23
5
14:NOV:2013:15:49:23

Balamurali.P.C wrote:
This was the table which i created...
CREATE TABLE dummy(Serial NUMBER(6),Moment VARCHAR2(100));
The below is the procedure that i used fro my job on the above table...
CREATE OR REPLACE PROCEDURE dummy_dummy IS
a NUMBER(6):=0;
BEGIN
FOR i IN A..10 LOOP
INSERT INTO dummy VALUES(a,TO_CHAR(SYSDATE,'DD:MON:YYYY:HH24:MI:SS'));
a:=a+1;
END LOOP;
END dummy_dummy;
And, the below is my job coding....
BEGIN
DBMS_SCHEDULER.CREATE_JOB
job_name                  =>  'for_dummy_dummy_proc',
job_type                  =>  'PLSQL_BLOCK',
job_action                =>  'BEGIN dummy_dummy; END;',
start_date                =>  SYSTIMESTAMP,
repeat_interval           =>  'freq=minutely; interval=1;',
end_date                  =>  NULL,
enabled                   =>  TRUE,
comments                  =>  'This JOB is to update dummy values in the DUMMY table'
END;
BEGIN
DBMS_SCHEDULER.RUN_JOB
job_name              =>  'for_dummy_dummy_proc'
END;
Everything went on fine except the first run of the scheduling....
At 49 minute... it ran two times at 23 rd and 28 th.
But, then after it ran fine once a minute on every 23 rd second. Why am I facing this problem????
It isn't problem, you have the expected behaviour: you scheduled it to run every minute, starting from 49:23 when you created the job as ENABLED, and then you ran it manually at 49:28.
Incidentally, the line a:=a+1  is not doing anything for you.

Similar Messages

  • RMAN started with job Scheduler on RAC

    Has someone an example how to define a job in Oracle job scheduler to run RMAN on one of the running node.
    The idea is be able to choose automatically in case of faillure the node where the RMAN backup will run.

    This may not be a direct answer to your question, but, thinking it might be helpful to you.
    In case, if the instance crashses half way through during RMAN backups, you can presume RMAN backups by placing 'NOT BACKED UP SINCE TIME' to backup the datafiles which are not backed up since the given time.
    Jaffar

  • Problem with job scheduling

    When I execute that job :
    VARIABLE nojob NUMBER;
    begin
    DBMS_JOB.SUBMIT(:nojob,'my_proc();', sysdate, 'sysdate + 15/24');
    end;
    the job is submitting successfully, but it can't run automatically. If I force it :
    begin
    DBMS_JOB.RUN(:nojob);
    end;
    I've the following error :
    ERROR at line 1:
    ORA-12011: execution of 1 Jobs failed
    ORA-06512: at "SYS.DBMS_IJOB", line 394
    ORA-06512: at "SYS.DBMS_JOB", line 267
    ORA-06512: at line 2
    Have you already seen that problem !
    And do you know how resolve it?
    Thanks.
    null

    Same Problem persists. I removed ':' from my code and tried again, No progress. Here is my code and error message again when I try to run the job manually by dbms_job.run(jobno).
    DECLARE
    jobno number;
    BEGIN
    DBMS_JOB.SUBMIT(jobno,
    'dbms_utility.analyze_schema(''JHTMW_TU_KAMAL'',''COMPUTE'');',
    SYSDATE, 'NEXT_DAY(TRUNC(SYSDATE), ''WEDNESDAY'') + 13/24');
    COMMIT;
    END;
    The error code is
    SQL> exec dbms_job.run(21);
    BEGIN dbms_job.run(21); END;
    ERROR at line 1:
    ORA-12011: execution of 1 jobs failed
    ORA-06512: at "SYS.DBMS_IJOB", line 394
    ORA-06512: at "SYS.DBMS_JOB", line 276
    ORA-06512: at line 1
    Michael
    My job processes are on. I have a value 2 set for job_queue_processes and the value 10 is set for job_queue_interval in my init.ora file.
    null

  • Help with job scheduling; decode error

    Hi
    Iam trying to change a job that runs my procedure using dbms_job.. Here is the output I got.
    Can someone help me why this is giving me errors.
    <code>
    SQL> exec dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24'));
    BEGIN dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24')); END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL
    statement only
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    </code>
    Thanks in advance

    I'm not sure what you're trying to achieve.
    Is this a one time action or do you want to run this statement on a regular basis?
    How about this:
    begin
      if ( to_number(to_char(sysdate,'hh24')) <= 17 ) then
        dbms_job.next_date(395, 'trunc(sysdate)+18.5/24');
      else
        dbms_job.next_date(395, 'trunc(sysdate)+1+6.5/24');
      end if;
    end;

  • Problems with Job Scheduling  Monitoring

    <Orignial text erased>
    Solicitation not tolerated on SDN. I deleted the other posts from him, but I didn't want to loose the good responses in this thread. Mark Finnern.
    Message was edited by: Mark Finnern

    I guess you didnt see the weblog.
    Yes, it was for you although I should probably have added a
    Check out the weblogs from 24th Sept.  Lutz wrote one titled "All points go to Ibai" - I thought you might have read it.
    /people/lutz.morrien3/blog/2004/09/24/all-points-go-to-ibai
    John.

  • Job scheduling

    Hi Friends,
             i have a problem with job scheduling.
    two jobs need to be scheduled. (job1 and job2)
    i used
    job_open.
    submit job1 using parameters.
    job_close.
    then for second job.
    job_open.
    submit job2 using parameter2.
    job_close.
    when i go and look in sm37. i see when job1 is running the job2 is in release status.
    but what we need is when job1 is running job2 should be in schedule status. it should start only after job1 is completed.
    in the job2 job_close i used job1 as the PRED_JOBNAME.
    but i when i run the program job2 is in released status , not in schedule mode.
    is there any way we can make the job2 in scheduled mode instead of release.
    can we use event to control this. if yes please let me know how we can do it.
    Thanks

    Hi,
    As Appana wrote - i'm not sure there's a problem, but why don't u make one job with 2 steps? this way u will be perfectly sure that job2 (2nd step in the new job) will run only after job1 (1st step n the new job)...
    Good luck
    Igal

  • ASE 15.7 Job Scheduler won´t start again

    Hi,
    we encoutered the following problem in our ECC6.0 / EHP5 on ASE 15.7 PL 122 System:
    DBACockpit / Collector Configuration shows the warning "The ASE-Job Scheduler is not active". The log SID_JSAGENT shows the following entries:
    00:11704:12104:2014/09/01 08:00:35.78 jamain  Opening jsagent connection.
    00:11704:12104:2014/09/01 08:00:35.78 jamain  Agent will listen on <IP>
    00:11704:12104:2014/09/01 08:00:35.78 jamain  SYB_JSAGENT waiting for connection
    00:11704:12104:2014/09/01 08:00:36.72 jamain  Job Scheduler Agent connected with Job Scheduler Task on port 4903
    00:11704:12104:2014/09/01 08:00:36.72 jamain  Initializing SYB_JSAGENT
    00:11704:12104:2014/09/01 08:00:36.72 jamain  Allocating list resources.
    00:11704:12104:2014/09/01 08:00:36.72 jamain  Allocating queue resources.
    00:11704:12104:2014/09/01 08:00:36.72 jamain  Allocating thread resources.
    00:11704:12104:2014/09/01 08:00:36.72 jamain  Initializing connection pool.
    00:11704:12104:2014/09/01 08:00:36.99 jamain  Client message: ct_connect(): user api layer: external error: The connection failed because of invalid or missing external configuration data.
    00:11704:12104:2014/09/01 08:00:36.99 jamain  ct_connect() failed.
    00:11704:12104:2014/09/01 08:00:36.99 jamain  jsj_AddConxs: jsd_MakeConnection() failed for user jstask to server SID
    00:11704:12104:2014/09/01 08:00:36.99 jamain  jsj_CreateConxPool: jsj_AddConxs() failed
    00:11704:12104:2014/09/01 08:00:36.99 jamain  Initialization failed initializing connection pool
    00:11704:12104:2014/09/01 08:00:36.99 jamain  Jsagent failed to handle INIT message.
    00:11704:12104:2014/09/01 08:00:36.99 jamain  JS Agent aborting. Cancel all running jobs.
    00:11704:12104:2014/09/01 08:00:36.99 jamain  Job Processing failed.
    00:11704:12104:2014/09/01 08:00:36.99 jamain  JS Agent exiting.
    Restarting the scheduler on ISQL doesn´t seem to work. Any ideas?
    Many thanks & greetings
    Vierengel Stefan

    Hi,
    thank you. Problem was solved by performing the following steps
    1.     deleting the following file: DRIVE:\sybase\SID\OCS-15_0\ini\ocs.cfg
    2.     Stop / Start Job Scheduler
             exec sybmgmtdb..sp_sjobcontrol '','stop_js'
            go
             exec sybmgmtdb..sp_sjobcontrol '','start_js'
            go
    3.     Refresh DBACockpit
    Greetings
    Vierengel Stefan

  • Job with Multiple Schedule of same time & only one is executed, Why

    Hi ALL,
    I've Created a package to notify report in email  as excel, which is using a path to render report and save it as excel.
    This package was need to be schedule every first day of month and on every Friday even at morning 7 AM.
    So logically these are two events.
    But if we see on 1 May 2015 we have Friday and plus first day of month
    So technically this should fail.
    either for IO operation for render &
    storing data over same location with same file name.
    To replicate this i created two three schedule
    Below is the job history, job is invoked by only one schedule
    Question-
    1) Why one one schedule execute?
    2) why "sched2" only , it could be "sched3" only or "DentalOperationStackAndRank-Sched1" Only?
    Another this i result into error if different job executing same package at same schedule.
    FYI- package is deployed at database level
    HS

    Hi HS,
    As described in this
    article, more than one job can run on the same schedule, and more than one schedule can apply to the same job.
    And I make a test about your scenario, when configuring a SQL Server job with three schedules that reference same dates and times, my job behaves as yours that only one schedule is executed, but the job is invoked by schedule2 or schedule 3 in my environment.
    It is a normal behavior of SQL Server job in my opinion. For more details about such scenario, you can track the job following this
    blog.
    However, when I configure three jobs that run on the same schedule, everything works well and the three jobs all run successfully.
     I recommend you configure three different jobs that execute same package at same schedule .
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Reports-Job-Scheduler: create job with startoption later: wrong date-format

    Hi,
    I test reports 11.1.1.2.0 (weblogic11 g) and try to start a report job with Reports-Job-Scheduler.
    Startoption: later and date = 09:48 Jan 12, 2010
    When I submit the job I get following Error:
    REP-50006: Das Argument SCHEDULE ist in der Befehlszeile ungültig: 09:48 Jän 12, 2010
    in english:
    Rep-50006: argument Schedule is wrong in command line: 09:48 Jän 12, 2010
    Why is Jän instead of Jan.
    When I start the report in February then it works.
    I defined also environment variables in basic configuration for the report server:
    NLS_DATE_FORMAT DD.MM.YYYY
    NLS_DATE_LANGUAGE GERMAN
    NLS_LANG GERMAN_GERMANY.WE8ISO8859P1
    I would be very pleased to get support.
    Many thanks
    Alois

    I created a SR and oracle support found a bug in EM.

  • When & how to use default settings option in job scheduling with BO 4.1

    Hi,
    With BO 4.1 we got new features and one of them is "Default Settings" option in the job scheduling. While scheduling a report in CMC we are getting below attached screen. I want to know when and how to use this option? while scheduling job on queries.
    Please guide me to, thanks in advance.
    Regards,
    Mithun Pati.

    Hi Mithun,
    Below thread may give you clear idea.
    The Purpose of the default settings is to have customized default settings for the enterprise. These settings would apply to any user who has access to Info view and wants to schedule a report. For example you can setup default values for "From" section of email so any scheduled reports use those settings. Similarly another setting we have defaulted is the number of retires involved and the seconds for each retry. Business Objects will not send out a failure emails unless the last retry has failed. The default settings should only be modified by an admin.
    Purpose of Default Settings when scheduling a WebI report?

  • Configuration Guide Job Scheduling Management with SAP Solution Manager

    Dear Gurus
    Could you please help me with the configuration guide of the Job Scheduling Management with SAP Solution Manager
    Best Regards

    Hello Luis,
    the configuration activities can be accessed via the "Implementatiopn Guide" by calling transaction SPRO in your SAP Solution Manager system.
    In SPRO navigate to -> SAP Solution Manager -> Scenario-Specific Settings -> Job Scheduling Management -> Standard Configuration and execute the following two activities.
    1. Activate Solution Manager Services
    2. Set Up Work Center for Job Scheduling Management
    Make sure that your user has role SAP_SM_SCHEDULER_EXE (or_ADMIN) assigned.
    Afterwards you should be able to access the Job Management Work Center and to create Job Documentation or to import Jobs from a Managed System into new Job Documentations.
    The following SAP notes might be usefuly as well:
    1054005  - FAQ on Job Scheduling Management
    1117355  - Work Center roles
    Kind regards,
    Martin
    http://service.sap.com/jsm

  • Job Scheduling tool with SAP SolMan

    Hi Experts,
    Please advise on among Autosys, BMC or Redwood , which one is the best to work with Sol Man in job scheduling purpose.
    Thanks

    Hi Preema,
    I would strongly recommend Redwood since it integrates with all SAp components including Solman.
    - Bhushan

  • Job scheduling with J2EE on Weblogic 8.1

    Weblogic 8.1 is not J2EE 1.4 compatible
    I need to setup a job scheduling task. Has anyone done this with WL 8.1?
    What is the best way to implement functionality similar to that provided by the J2EE Timer service in J2EE 1.4 compatible servers?
    thanks very much

    Yeah, we use quartz too, but with the Spring wrappers. Works pretty nicely.
    Read up on:
    http://www.springframework.org/docs/reference/scheduling.html
    Cheers
    IV

  • Job scheduling in CPS with SOLMAN

    Hi,
    I'm looking for info on job scheduling in CPS using solution manager with and without the Process scheduling adapter.
    Regards,
    Esha

    Hello Esha,
    follow this link to all tutorials on JSM & SAP CPS:
    http:/service.sap.com/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000063102008E
    Use this link to download all information on JSM
    http://service.sap.com/~sapidb/011000358700001996012008E.zip
    Regards,
    Martin
    Please follow us on SDN:
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/u/25168834 [original link is broken] [original link is broken]
    /people/martin.lauer/blog
    and SAP Service Marketplace:
    http://service.sap.com/jsm

  • Problem with background job schedule

    Hi friends,
    How to schedule more than one data loading jobs in backround??
    When i try to schedule the second job,the first scheduled job is getting overwritten,and only this job is active.
    I tried in infopack,scheduler...
    How to overcome this???
    Regards
    sudhakar

    Hello Ragu,
    How r u ?
    Use Process Chains for this multiple Job Scheduling.
    I think u r teying to schedule the same InfoPackage !
    Could u elobrate ur issue ?
    Best Regards....
    Sankar Kumar
    +91 98403 47141

Maybe you are looking for

  • Optimize process designing with Photoshop (or other Adobe apps)

    Hi I am searching for a long time to optimize my process, and I want to ask you if there is a solution to what I am looking for: 1. can I create a custom panel in Photoshop CS5 where I can save smart objects? for later use?, I am working with Mini-Br

  • Windows XP SP3. Unable to install AIR, any help?

    Hello, I'm trying to install AIR on my Windows XP SP3 workstation.  I had 1.5.0.7220 installed, but the application wanted to update it so I downloaded the newest runtime.  Tried to upgrade it but it wouldn't upgrade, kept saying Error 0. So I tried

  • Data Protection Mode

    Hello, 1) In order to set Data protection mode, do I need to set anything on standby? 2) My database is in Maximum Performance mode. I set up following entry on init.ora: LOG_ARCHIVE_DEST_2='service=standby LGWR ASYNC'. I want to change data guard pr

  • Define a function at runtime...

    is it possible to define a function at runtime and call it...? i.e i have a program thats makes a call to some function xxx() in a class Abc but there is no definition for xxx() yet..hence during runtime the user types in the code and compiles it and

  • My Safari 5.0.3 crashes instantly

    Anyone please help.. about 2 months ago my safari just started crashing and automatically quits after opening it. I've uninstalled and reinstalled it for a couple of times but it still does the same thing. I've recently updated it to 5.0.3 and it sti