Support Article
ORA-12899: value too large for column
SA-45331
Summary
Error occurs when saving data in the pyLabel column in the database. The pyLabel column is set to 64 bytes. When data contains special characters, they occupy more than 1 byte. On converting the pyLabel data, the converted data exceeds the 64 bytes limit.
Error Messages
.pyCommitError: ** Problem writing an instance to the database: code: 12899 SQLState: 72000 Message: ORA-12899: value too large for column "_DATA"."PR_ASSIGN"."PYLABEL" (actual: 65, maximum: 64)
Steps to Reproduce
- Configure an email listener
- Send an email with subject containing a special character which occupies more than 64 bytes (for example, CashPro® Online eMail Validation Code). This does not create a case and an error is displayed.
Root Cause
By default, the columns created as VARCHAR use byte semantics and a column length of 64 is 64 bytes. Some foreign language characters use multiple bytes (such as, ê) in UTF-8 which is a multi-byte character set. Pega treated a special character as a single character, however, it occupied more than 1 byte. The data length exceeded the column limit despite truncating by Pega.
Resolution
Alter the column such that it provides the character length and not the number of bytes.
For example, ALTER TABLE MODIFY <column> VARCHAR2(n CHAR);
Published February 5, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.