Ad Widget

Collapse

Value "4,38" of type "string" is not suitable for value type "Numeric (float)"

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eliafont
    Junior Member
    • May 2024
    • 2

    #1

    Value "4,38" of type "string" is not suitable for value type "Numeric (float)"

    I'm monitoring an Oracle Database by applying the Template Oracle by ODBC.

    Searching on the forum the problem seems to be on the NLS_NUMERIC_CHARACTERS parameter conifiguration:

    Code:
    select value
    from nls_session_parameters
    where parameter = 'NLS_NUMERIC_CHARACTERS';
    
    VALUE
    ----------------------------------------------------------------
    ,.
    Unfortunatelly I'm not able to change permanently the parameter.

    I also see that a possible way to adjust this problem is by using a preprocessing and replace "." with "," and viceversa.
    However i'm looking for a more robust and modular solution.
    I tried to modify just the current session by adding this command inside the SQL query template
    Code:
     ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '.,';
    but i get the following error message:
    Cannot execute ODBC query: [SQL_ERROR]:[HY000][922][[Oracle][ODBC][Ora]ORA-00922: opzione mancante o non valida]

    Is there a way in zabbix I can modify this parameter without changing it permanently?

    Thanks for help.
    Regards.
  • Answer selected by Eliafont at 27-05-2024, 12:06.
    Eliafont
    Junior Member
    • May 2024
    • 2

    I solved the issue by creating the following trigger:
    HTML Code:
    CREATE OR REPLACE TRIGGER set_nls_on_logon
    AFTER LOGON ON DATABASE WHEN (user='C##ZABBIX')
    BEGIN
     EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ''.,''';
    END; /

    Comment

    • Eliafont
      Junior Member
      • May 2024
      • 2

      #2
      I solved the issue by creating the following trigger:
      HTML Code:
      CREATE OR REPLACE TRIGGER set_nls_on_logon
      AFTER LOGON ON DATABASE WHEN (user='C##ZABBIX')
      BEGIN
       EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ''.,''';
      END; /

      Comment

      Working...