This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DB-Scheduler-Task vid_DBSchedulerTaskFill

Hi there

i'm searching through the procedures to find the root cause of the calculation which changes Granted PWOs to Assigned PWOs. Yesterday PWOs which where ValidFrom 00:00 where assigned at 14:00

I found out out that the Procedure vid_DBSchedulerTaskFill which is used in vid_DBScheduler uses the view vi_DBSchedulerTaskView_0 to generate the viShoppingRackCheckValid, but i cannot find the cause why the Procedure VID_DBSchdulerTaskFill is called by the VID_DBScheduler. There has to be a defined ExecLevel but how the ExecLevel is set?

So what is the cause that PWO that are valid from 00:00 are not assigned at this time?

Thx in Advance,

Martin

  • Hi Martin,

    i believe, the recurring jobs for model part will be part of payloadschedule since version 5.x.

    So please have a look on configuration for your payload-agent job.
    Could it explain the behaviour?

    I hope, i'm not completely wrong in my first community-post.... ;-)

    Regards

    Andreas

  • Hi Andreas,

    i think the payload or eiter the DialogSchedules are for closing requests that has reached the validuntil-date or to Inform owners over closing  requests in the next xx days or requests that has to be approved.

    In my special case the requests are set to a validfrom-date in the future which was reached at 00:00 this day. In this special case i think the DBScheduler is the component which will handle this calculation.

    At this day the DB-Scheduler was very busy. So this was the main reason. But i would like to understand if this problem whas caused on the Sortorder of the tasks or if there is some kind of logic that will only create these kind of DB-QueueTasks if the DBQueue is empty. A look at the SQL shows some logic of the Variable ExecLevel. But i did/do not understand how this variable is handled/set. 

    So it would be nice to get a hint how this work to bring some light into Scheduler-darkness ;-)

    And 2nd more generic question: Is there any possibility to monitor the DBQueue-Calculations over a timeslot by default or either has anybody done this in a project and would like to share the experience.

    Version is 6.1.3.

    Thx.

  • Hi Martin,

    so one by one.

    The ExecLevel is used by dbscheduler to handle a run upo to a certain sortorder and also to handle some internal situations (running in simaulation mode for instance). This variable will not be set inside the dbscheduler-proc and the sql-server-agent not delivers a value for this. 

    What i was meaning with my hint for payload-schedule: the payloadschedule is, every time he his running, executing a procedure named vi_modelreccuringjobs.sql . There is a check for pwo-objects  have reached the validfrom:

    ....

    if exists

    (select 1
                    from personwantsorg pwo
                    where pwo.OrderState = N'GRANTED'
                   and isnull(pwo.validFrom , '1899-12-30') < getUTCDate()
                   and isnull(pwo.validUntil , '2200-01-01') > getUTCDate()

    )
         begin
             exec vid_dbschedulerinsert 'ShoppingRackCheckValid', '', '', @GenProcID
         end

    .....

    The ShoppingRackCheckValid is running in dbscheduler an checkis the PWO and, if validfrom has reached, making a insertforhandleobject - callmethod for method assign.

    If this is not done at 0:00 so yes, if the dbqueue is full with other tasks with lower sortorder this job is waiting. Maybe until 14:00.

    But there is no check in payloadschedule or modelreccuringjobs if the dbqueue is on heavy load or not.


    Regarding the 2. question:

    You can the loglevel of dbscheduler set to 2 (configparm) if you want to have more informtions about the work of the dbscheduler. Than the dbscheduler is logging some more things into the dialogjournal.

    The second way is to make a sql-trace for the SPID of the dbscheduler during a scheduler-run. than you see all things happen on dbscheduler-work on sql-layer.

    I hope, there is a little bit more light .... ;-)

  • Sun is shining trough the window ;-)

    the hidden Exec vi_modelreccuringjobs in vi_payloadschedule of the sql Jobscheduler :-)

    To the 2nd question:

    If i change the loglevel i see what the scheduler has done to a specific time but i do not see how much tasks where there at a specific time an this is the information i want to have. The SQL-trace is possibly a little bit over the top, but i wanted detail and now i got detail.

    So thank you

  • As far as i know there is no logging about such data.

    But you can have a look into the dialogdbschedulertask-table. There are some statistic data about the DBScheduler-jobs.

    Ifyou wanted to have such monitoring could create an own dbscheduler-task with low sortorder wich comes from time to time an write counts for the different tasks in the dialogdbqueue to a custom-table.

    A way in the standard-product to do this monitoring, i don't know.