When we run statements against an Oracle 12c Enterprise Edition Release 12.2.0.1.0, which contains casts of numerical values to VARCHAR2(4000 char), we receive an ORA-03113 end-of-file on communication channel.
Various resources - such as https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:9527821800346583868 describe, that this might be caused by a wrong database configuration. The mentioned resource (asktom.oracle.com) has one in common - they mentioned the same boundary of 1002 / 1003 where we encounter the error. However, I was not able to find a specific configuration/explanation which leads to this behaviour - especially with the 1002/1003 boundaries. Let me show a sample query:
This works:
select cast(numerical_value as varchar2(1002 char))
from my_table;
This fails with ORA-03113:
select cast(numerical_value as varchar2(1003 char))
from my_table;
Has anyone ever observed this behaviour or can tell me, which database setting might cause this?