Batch job error after DB drop

D365 Tech Support Forums Finance and Operations General Batch job error after DB drop

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #962
    ConveyPhantom
    Participant

      I just took a database backup from a Tier2 environment. After I had the box I tried to run some batch jobs and debug an issue. However, I was unable to and started getting the following errors:

      session 2 (-AOS-)

      Cannot select a record in Batch job (BatchJob). Status: Withhold.

      The SQL database has issued an error.

      Object Server DynamicsAXBatchManagement:

      [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The multi-part identifier “T2.PARTITION”

      could not be bound.

      SELECT T1.CANCELEDBY,T1.CAPTION,T1.COMPANY,T1.DATAPARTITION,T1.ENDDATETIME,T1.ENDDATETIMETZID,T1.FINISHING,T1.LOGLEVEL,T1.ORIGSTARTDATETIME,T1.ORIGSTARTDATETIMETZID,T1.RUNTIMEJOB,T1.STARTDATETIME,T1.STARTDATETIMETZID,T1.STATUS,T1.STARTDATE,T1.STARTTIME,T1.CRITICAL,T1.MONITORINGCATEGORY,T1.MANAGED,T1.ACTIVEPERIOD,T1.EXECUTINGBY,T1.SCHEDULINGPRIORITY,T1.SCHEDULINGPRIORITYISOVERRIDDEN,T1.BATCHGROUP,T1.EMITBUSINESSEVENT,T1.CREATEDDATETIME,T1.CREATEDBY,T1.RECVERSION,T1.RECID,T1.RECURRENCEDATA FROM BATCHJOB T1 WHERE EXISTS (SELECT ‘x’ FROM BATCHJOB T1 LEFT OUTER JOIN USERINFO T3 ON ((T3.PARTITION=5637144576) AND (T1.CREATEDBY=T3.ID)) LEFT OUTER JOIN USERINFO T4 ON ((T4.PARTITION=5637144576) AND (T1.EXECUTINGBY=T4.ID)) WHERE ((T2.PARTITION=5637144576) AND ((T2.RECID=T1.RECID) AND (T2.STATUS=?))))

      I was able to debug this error message to the following code:

      BatchJobEventsGenerator.processFailedJobEventsUsingBatchJobUpdateTmp()

      #1013
      CrypticCallback808
      Participant

        This code seems to be related to business events – looking at the events I can see the following two were activated:
        1. BatchJobCanceledBusinessEvent
        2. BatchJobFailedBusinessEvent

        I deactivated and deleted the business events. This allowed me to run batch jobs without getting the previously referenced error.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      D365 Tech Support