Submit a ticketCall us

Welcome to the NEW Success Center. Search all resources (documentation, videos, training, knowledge base articles) or browse resources by product. If you are unable to find what you are looking for, please contact us at customersuccess@solarwinds.com

 

 

 

 

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