ORA-12899 value too large for column
Errors are generated in logs when adding data to the database.
The database column has a length of 64 and user is trying to add 64 characters.
Character set used in database:
ORA-12899: value too large for column "PEGADATA"."PR_ASSIGN"."PYLABEL" (actual: 65, maximum: 64)
Steps to Reproduce
A defect or configuration issue in the operating environment.
The Oracle database was configured using a multi-byte character set and measured the length of the VARCHAR2 columns in bytes instead of characters.
This worked when all the characters inserted are a single byte.
Issue was encountered because one or more of the characters inserted were two or more bytes long and could not fit in the column.
Make the following change to the operating environment:
In the Oracle database, change NLS_LENGTH_SEMANTICS from BYTES to CHAR.
With this change, the Oracle database calculates the column lengths in characters instead of bytes for any newly created tables and columns.
Any existing VARCHAR2 columns will continue to use the semantics from when they were created.
To modify the semantics for any existing column, alter the individual columns to use CHAR semantics.
alter column pyLabel varchar2(64 char)