Catch ORA-12899 on insert
886207Jan 7 2012 — edited Jan 8 2012Hi,
I have an application who audits messages to the database. Message length is not standard and, when it exceeds the column length, insert fails. I have tried creating a trigger on insert for each row to substring the message. Trigger works for valid length messages, but it turns out that validation proceeds trigger execution and larger messages still fail with ORA-12899.
Is there any other way to implement this, besides the obvious (substring on the application level).
Thank you.
Leonidas