IBM License Metric Tool (ILMT)

 View Only
Expand all | Collapse all

Conversion failed when converting datetime from binary/varbinary string.

  • 1.  Conversion failed when converting datetime from binary/varbinary string.

    Posted Tue April 30, 2024 08:51 AM
      |   view attached

    My customer has migrated the TEMADB from one remote DB instance to other remote instance. We changed both database.yml and server.xml to reflect the new database server and new port. After ILMT restart the ILMT application is not comming up, and the tema.log file is reporting:

    com.ibm.ws.webcontainer.webapp                               I

    SRVE0292I: Servlet Message - [tema]:.[ERROR] An error occurred while executing the periodic task updating BigFix server action statuses

    (the task will be re-tried per its schedule):

    DBNAME: TEMADB - Java::ComMicrosoftSqlserverJdbc::SQLServerException:

    An error occurred during the current command (Done status 0).

    Conversion failed when converting datetime from binary/varbinary string.

    The database collation remains the same.

    BigFix part works normally, no issues here.

    Any idea what went wrong and where to fix this problem ?

    The full tema.log is attached.



    ------------------------------
    JAN FLEGR
    ------------------------------

    Attachment(s)

    log
    tema.log   14 KB 1 version


  • 2.  RE: Conversion failed when converting datetime from binary/varbinary string.

    Posted Tue April 30, 2024 09:51 AM

    Hello Jan,

    A blind guess would be that database collation or SQL Server user's locale/language is incorrect.
    One of the SQL Server requirements is that user's default language is set to 'English'.
     
    Anyhow, let's check some basic stuff :
    SELECT name, collation_name FROM sys.databases WHERE name like '%temadb%'
    DBCC USEROPTIONS
    SELECT GETDATE()
     
     
     
    At last,
    Please don't change the database.yml / server.xml files directly as such activities are used to be error prone.
    Starting from 9.2.30 there is a dedicated script for changing database parameters: https://www.ibm.com/docs/en/license-metric-tool?topic=database-changing-connection-parameters
    That script will take care of of all underlying connection details...



    ------------------------------
    Thank you,
    Oktawian

    Oktawian Powązka, L3 Support
    IBM License Metric Tool
    ------------------------------



  • 3.  RE: Conversion failed when converting datetime from binary/varbinary string.

    Posted Thu May 02, 2024 11:08 AM

    I forgot to add that 'DBCC USEROPTIONS' command needs to be executed by the same database User as it's being setup on ILMT side.
    This is vital...those relevant settings like language/dateformat are session-level, thus, are user specific.



    ------------------------------
    Thank you,
    Oktawian

    Oktawian Powązka, L3 Support
    IBM License Metric Tool
    ------------------------------