ORA-01461 - LONG Data Error in Sync
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

ORA-01461 - LONG Data Error in Sync

Error

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

Cause

This error occurs when:

  • REDCap sends a long text value (>4k characters)

  • OpenSpecimen uses VARCHAR which can store a maximum of 4K chars.

  • For greater than 4K, we have to use BLOB or CLOB fields which we do not support currently.

Workaround

Option 1: Exclude the field from sync

Querying is the primary reason for pulling REDCap data into OpenSpecimen. However, such long text fields are not ideal for queries in OpenSpecimen since there is no index on them. Even if added, doing a “contains” in a free-text field is not an ideal way to query. Also, it will slow down syncs when pulling such large datasets.

Refer to the wiki page to exclude the fields from sync.

Option 2: Keep the field but reduce its size

In REDCap:

  1. Shorten the field size to fewer than 4,000 characters, or

  2. Split the content across multiple fields

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com