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

Parents
  • 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 .... ;-)

Reply
  • 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 .... ;-)

Children
No Data