Submit a ticketCall us

WebinarUpcoming Webinar: Know What’s Changed – with NEW Server Configuration Monitor

Change management in IT is critical. But, even with a good change management process, changes are too often not correctly tracked, if at all. The configuration of your servers and applications is a key factor in their performance, availability, and security. Many incidents can be tracked back to an authorized (and sometimes unauthorized) configuration change, whether to a system file, configuration file, or Windows® Registry entry. Join SolarWinds VP of product management Brandon Shopp to discover how the new SolarWinds® Server Configuration Monitor is designed to help you.

Register now.

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

Data truncation errors in DPA logs related to alerts

Updated March 27, 2018

Overview

This article provides information to resolve a data truncation issue that can occur in DPA with SQL Server repositories. If you receive an error similar to the following, see the resolution section below.

 

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

Tags

Classifications

Public