Knowledge Base >> Data Trunction Errors in Ignite Logs Related to Alerts

Data Trunction Errors in Ignite Logs Related to Alerts - Confio Article 1587

Confio Article: 1587 Published: Feb 16 2010 8:59 AM
Version: >=8.0 Topic(s): Ignite Management
Product(s): Ignite
Database(s): MS SQL

Introduction

There is known "Data Truncation" problem that occurs in Ignite with SQL Server repositories.  There error looks similar to the following:

ERROR  (2010-02-12 15:45:58,402) [AlertPostProcessorThread] AlertTaskPostProcessor - Error writing alert history to Repository for DatabaseAlert [alert=Custom SQL Alert - Multiple Numeric Return, database=AABT1_STPCUOR02DM]

org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into CON_ALERT_HISTORY (ALERTID,DBNAME,ACTIONDATE,HISTORYID,LEVELNAME,LEVELVALUE,DESCR,CONTACTEES) values (?,?,?,?,?,?,?,?)]; Data truncation; nested exception is java.sql.DataTruncation: Data truncation

Caused by:
java.sql.DataTruncation: Data truncation
                at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:382)
                at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2817)
                at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2255)
...

 

Problem

This problem occurs because the data types for the HISTORYID column in the CON_ALERT_HISTORY and CON_ALERT_HISTORY_RESULTS is defined as a smallint.  If you have alerts defined within Ignite, it keeps a history of each execution of the alert and can overrun the size of a smallint.

Workaround

Increase the HISTORYID column to a bigint in the CON_ALERT_HISTORY and CON_ALERT_HISTORY_RESULTS tables.