Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Mobile DB Generation Cron Task Error

  • 1.  Mobile DB Generation Cron Task Error

    Posted Mon January 06, 2025 02:37 AM

    Hi everyone,

    We are getting an error at the Mobile DB Generation cron task as attached in screenshot.
    It says 'Database error 0' while executing 'MOBILEASSET' saved query.  But the same quey is running fine  if we try from SQL editor. 
    Could not find any error messages in  System out log file.
    Has anyone faced similar error and Resolved?
    Kindly share your expereience/suggestions?


    Appreciate your response!

    Regards,



    ------------------------------
    Sankar Ganesh
    ------------------------------


  • 2.  RE: Mobile DB Generation Cron Task Error

    Posted Mon January 06, 2025 07:09 AM

    Hi Sankar,

    I'm suggesting you to first check if everything works ok with saved query MOBILEASSET when you are using "Role Based Application".  This query to MXAPIASSET object structure is executed, for example, when you open "Create Work Order" view.

    How your test could look like:

    1. Log into the Maximo/Manage using the same user that you used for MobileDbGeneration cron task instances ("Run as User" - I think it's MOBILEVENDOR in your case).
    2. Navigate to "Technician" Role Based Application
    3. In the browser open Developer Tools and select Network tab
    4. In "Technician" app use waffle menu and select plus icon (Create New Work Order)
    5. In Network tab find http request to Maximo for asset (please see the screen below). Check what is the response code. If it's not 200 then you reproduced issue with Role Based Application (look into the response section as well).

    What next?

    • Please duble check if the user that you used to create pre-loaded database has set DEFSITE in MAXUSER table. Please also review if this user has all of the required privileges for selected SITEID.
    • If you have "sql" logger set to "ERROR" or "WARN" then please change it to "INFO" and "Apply settings". After that try to reproduce issue once more and review Maximo/Manage log file. When you wrote that "the same query" was run using SQL Editor does it mean the whole query including all columns (attributes) or just "where" section. It's important to check if the whole query works ok, including columns.


    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 3.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 12:58 PM

    The advice from Bartosz is a good way forward. the log message you have seen could refer to the first of many SQL statements that are being executed.

    Setting the "sql" logger set to "INFO" and "Apply settings" will encourage the system to log more SQL statements and you may then find the one that is having a problem.

    It is also worth checking the systemerr.log file for any entries that are generated when the operation occurs...

    Most of the IBM code uses the loggers properly but some bits use printStackTrace and that would only write entries to the systemerr.log file... without a lot of the more valuable info



    ------------------------------
    Mark Robbins
    Support Lead/Technical Design Authority / IBM Champion 2017 - 2023
    Cohesive (previously Vetasi Limited)
    https://www.linkedin.com/pulse/maximo-support-advice-from-non-ibm-engineer-article-mark-robbins/
    ------------------------------



  • 4.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 01:25 AM

    Hi Sankar,

    What is the version you have of Maximo Mobile?  I know that 9 IFIX002 has a bug with respect to mobile db generation. It does not work.

    IBM had said to me that it will be fixed in next IFIX and no work around available for the same.



    ------------------------------
    Ritesh Ranjan
    ------------------------------



  • 5.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 02:09 AM

    Hi Ritesh,

    do you have by any chance APAR or DT reference to confirm that?
    That seems to be server-side error with a saved query and I have hard time correlating "9 IFIX002" to any currently known Mobile or Manage version.
    Could you be more specific?



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 6.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 02:50 AM
    Edited by Ritesh Ranjan Tue January 07, 2025 02:53 AM

    Hi Andrzej,

    Environment is Maximo Mobile 9 IFIX002 with Maximo 7613 IFIX23.

    Here is the DT reference for you - https://www.ibm.com/mysupport/s/defect/aCIKe000000CimwOAC

    For this issue, it might not be related, so that's why I asked him the version details whether it is 9 IFIX002 of Mobile.

    ------------------------------
    Ritesh Ranjan
    ------------------------------



  • 7.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 03:10 AM

    Hi Ritesh

    I'm afraid that this DT has nothing to do with the problem reported by @Sankar Ganesh V S.
    It concerns MAS 9 rather than Maximo 7.6.1.3 (whatever IFIX). 

    Furthermore Sankar's error reference points to SQL issue while this DT is clearly about processing the REST request. 
    I would suggest to follow @Bartosz Marchewka lead.



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 8.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 03:51 AM

    Hi Andre,

    Just FYI. That DT concerns 7613 also, not only MAS, because I have faced that.



    ------------------------------
    Ritesh Ranjan
    ------------------------------



  • 9.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 03:54 AM

    Hi Ritesh,

    good to know! Thanks for the clarification.



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 10.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 11:50 AM

    Hi Ritesh, 

    Thanks for your response!

    We use Maximo Mobile 8.11 and Maximo7.6.1.3
    The IBM defetct you mentioned is different to what we are facing and is error is intermittent in our case.

    @Bartosz Marchewka, I tested the Cron user (MOBILEVENDOR) as yousuggested . It is working good for the Obect structure, saved query - we get http 200 response while accessing Technician app. (Attached the screenshot)

    We'll enable sql logs and check if the error occus again.

    Thanks!



    ------------------------------
    Sankar Ganesh
    ------------------------------



  • 11.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 05:55 PM

    Error code 0 is a closed database connection error in SQL Server. It's possible Maximo is causing it but often these happen when something outside of Maximo closes the database connection and Maximo is not aware of it. For example, a database failover or scheduled job on the database server that closes older database connections. You should work with your DBA to try and understand what you have in place around the time of the failure that could cause it. 

    The difference between the web & mobile scenario is the web stops after it retrieves 100 assets. Mobile (or the preload database in this case) will need to continue & download every asset that matches the criteria (which we have customers that are in the millions). This means that connection could be left active for an extended period of time as it processes the result set. 

    We had a DT for SQL Server (DT389178 https://www.ibm.com/mysupport/s/defect/aCIKe000000ChBBOA0/dt389178?language=en_US ) that we only fixed in MAS (not in 7.6.1.3) even though it looks like 7.6.1.3 would have the same issue. This doesn't stop the closed database connection but improves how we handle it to try and re-establish a new connection. I don't know that it would help avoid this specific scenario though because you'd get a closed database connection when we're in the middle of processing the result set. 



    ------------------------------
    Steven Shull
    ------------------------------



  • 12.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 02:39 PM

    Sankar,

    Do you by any chance have a SQL comment in your saved query? Looking at the error I see --locationdesc, which makes me think you may have commented that out for testing purposes. This could very easily cause the saved query to error if that is the case. 



    ------------------------------
    Tim Ferrill
    Solutions Consultant
    Intelligent Technology Solutions
    tferrill@webuildits.com
    www.webuildits.com
    @tferrill/@webuilditsTim Ferrill
    Solutions Consultant
    Intelligent Technology Solutions
    tferrill@webuildits.com
    www.webuildits.com
    @tferrill/@webuildits
    ------------------------------



  • 13.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 02:52 PM
    Edited by Bartosz Marchewka Tue January 07, 2025 02:52 PM

    @Tim Ferrill Construction like that --locationdesc doesn't meant that this part is commented. It's the way how to create alias for attribute in maximo-datasource definition.



    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 14.  RE: Mobile DB Generation Cron Task Error

    Posted Tue January 07, 2025 02:55 PM

    Bartosz,

    Oh slick. I didn't know that. That's awfully handy.



    ------------------------------
    Tim Ferrill
    Solutions Consultant
    Intelligent Technology Solutions
    tferrill@webuildits.com
    www.webuildits.com
    @tferrill/@webuildits
    ------------------------------



  • 15.  RE: Mobile DB Generation Cron Task Error

    Posted Fri January 31, 2025 12:10 PM
    Edited by Sankar Ganesh V S Fri January 31, 2025 12:13 PM

    Hi Everyone,

    I would like share that database error 0 is not observed, after changed the cron instance schedule. We suspect the issue to be related to SQL server performance, as there is another SQL job running at same time. 

    Appreciate everyone sharing your experience and insights. It was truely helpful.

    I'll update here if any further happeing this.

    Thanks!

    ------------------------------
    Sankar Ganesh V S
    Technical Consultant
    DXC Technology
    ------------------------------