Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

Home > Success Center > Database Performance Analyzer (DPA) > Data truncation errors in DPA logs related to alerts

Data truncation errors in DPA logs related to alerts

Overview

This article provides brief information and steps resolve a data truncation issue that occurs in DPA 8.0 and later with SQL Server repositories. The error is 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)
...

Environment

  • All versions of DPA

Cause

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 small integer (smallint).  If you have alerts defined in DPA, a history of each execution of the alert is kept and can overrun the size of a smallint.

Resolution

Increase the HISTORYID column to a big integer (bigint) in the CON_ALERT_HISTORY and CON_ALERT_HISTORY_RESULTS tables.

 

Last modified
16:23, 6 Jan 2016

Tags

Classifications

Public