Link to home
Start Free TrialLog in
Avatar of mi_cky
mi_cky

asked on

Oracle Data On Insert Error: Data too large for column (is there a way a trace which column failed)

Hi guys, I have a jsp page with about about 60 data fields, which is inserted into an oracle table.  Sometimes the insert statement fails during insertion, getting error data too large for column.  Is there a way in oracle to automatically trace the colum that failed.
Please help with any infor, cheers!!!
Avatar of stefan73
stefan73
Flag of Germany image

Hi mi_cky,
Not that I know of. Can't you simply limit the jsp field sizes so that their limits match with the appripriate column sizes?

Cheers!

Stefan
When the insert fails with "Data too large for column", it's already too late.
Avatar of mi_cky
mi_cky

ASKER

Yes  but its a wide developement project at the moment , and issues such as limiting the field sizes to column sizes will be done towards the end of project. for now its lots of development .................
So does this means its totally impossible to trace this ............
ASKER CERTIFIED SOLUTION
Avatar of paquicuba
paquicuba
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi

u know which query is doin this so wht u can do is
using the dbms_system.set_sql_trace_in_session(sid,serial#,true) ..(pleases check the syntax)u can trace this and find out the trace file for this and also u can use the tkprof utility to format the trace file and then find out exactly where the problem occurs

regards
if you can figure out what the query looks like (through the log file), maybe you can simply run it through SQLPlus? remember to split the query into a few lines, and SQLPlus will tell you.