ORA-01438: How to find column name?
Hello,
I'm trying to find the column that's causing ORA-01438 when inserting into a table.
The insert is done by a C-program that reads from a network socket and writes to an oracle 10g database using Oracle Pro*C.
I have tried to identify the column by printing out the (approximately 250) values just before the insert statement is executed, but checking these values was a cumbersome and error prone task and did not help fix the error (I found a bunch of values that where out of range, but changing these values did not solve the issue).
Abandoning this idea, I tried to trace the session using
1) DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION,
2) DBMS_MONITOR.session_trace_enable/disable and even
3) alter system set events '10046 trace name context forever, level 12' and;
4) alter system set sql_trace=true scope=memory;
Only DBMS_MONITOR.session_trace_enable gave me some hints (the insert statement) in a trace file. But this only worked for a simple example on a test database.
When I try to enable tracing on the database, where the error occurs, then I'm not even able to set SQL_TRACE in V$SESSION to TRUE even though no error is thrown by the "DBMS_MONITOR.session_trace_enable" statement. The value of SQL_TRACE in V$SESSION just does not change and I don't have any clue why. On the test database it works fine and I can find the trace file in the user_dump_destination directory.
Does anyone have any suggestions on how to solve this problem?
Any help is very much appreciated.
Thanks in advance!