Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

Home > Success Center > Database Performance Analyzer (DPA) > DPA - Knowledgebase Articles > ORA-01461: can bind a LONG value only for insert into a LONG column

ORA-01461: can bind a LONG value only for insert into a LONG column

Overview

The following error or similar are found in the DPA logs:

org.quartz.JobExecutionException: TextPollJob failed [See nested exception: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO CONST_4 (H, P, ST, SS, SE, PNAME, LN, TRUNCATED, D) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [72000]; error code [1461]; ORA-01461: can bind a LONG value only for insert into a LONG column

Note: The location of the error can change. For example, it can occur in modules other than TextPollJob.

Monitored instance will not start monitoring. 

 

 SQL [INSERT INTO CONST_4 (H, P, ST, SS, SE, PNAME, LN, TRUNCATED, D) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [72000]; error code [1461]; ORA-01461: can bind a LONG value only for insert into a LONG column
; nested exception is java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column

    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate

Environment

DPA  

Oracle repository 

Cause 

Character encoding can be a cause. 

Historically database columns which hold alphanumeric data have been defined using the number of bytes they store. This approach was fine as the number of bytes equated to the number of characters when using single-byte character sets.

With the increasing use of multi-byte character sets to support globalized databases comes the problem of bytes no longer equating to characters.

 

So this can be caused when DPA is inserting into the Text poll or Plan poll tables. 

Resolution

Two possible resolutions exist.

Resolution 1

  1. Edit the <DPA_home>/iwc/tomcat/ignite_config/idc/repo.properties file on the DPA server and add the following line:
    repo.additionalProperties=oracle.jdbc.RetainV9LongBindBehavior=true
  2. Restart DPA.
    • Windows: Restart the Ignite PI Service.
    • UNIX or Linux: Run the following:
      1. shutdown.sh
      2. startup.sh

Resolution 2

  1. This resolution applies if the text is too long. We can set DPA to try to split it into smaller chunks, though in some edge cases those might be still too long in case of multi-byte characters.
    The chunk size is controlled by an Advanced Options > System Options > Support Options > DOUBLE_BYTE_CHUNK_LENGTH and NON_DOUBLE_BYTE_CHUNK_LENGTH for double-byte and single-byte repository respectively.
  2.  Please  lower the value in the corresponding field by a few hundred to see if that helps. DPA will still get all the data stored in the table. It will just split into more rows.
Last modified

Tags

Classifications

Public