KB Article #176081

ORA-12899 (value too long for column ...) when inserting event with accented characters

Problem

-- When adding some string in the database, if the string lenght is longer than the width of the column, Sentinel will truncate the string to the right number of characters.

-- If the string contains some characters encoded on more than one byte (special characters, unicode), the string lenght will depend of you database parameter. In your configuration, it seems Oracle define string length by its bytes number, and not by characters number:

nls_length_semantics=BYTE

So, when the column width was set to 500, Sentinel truncated the string to 500 characters, but if 36 characters in the string are encoded on 2 bytes, Oracle will return the error:

ORA-12899: value too large for column "DATABASE"."TABLE"."COLUMN" (actual: 536, maximum: 500).

Resolution

* To solve this kind of problem you have to modified database parameter. According to Oracle documentation, nls_length_semantics could be set to CHAR, and so string length will be count by characters, and not by bytes.

* This can be done by modifying the specific column type to varchar2. The following sql command enable it:
alter table TABLE modify COLUMN varchar2(500 CHAR);

There is no need to restart Oracle nor Sentinel after.

* This kind of modification can't be done automatically by Sentinel when creating table, because there is no way to specify which attribute will need it, meaning this will apply by default to all attributes. But this increase the database storage needed, so it will take more space as only few attributes need this modification.