Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

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