We have a third party application where the debug output provides Oracle error codes and messages, but not the offending SQL. I need to find out what the offending SQL that is causing an ORA-01401, "inserted value too large for column" is, so I can determine the table it is occurring on. Unfortunately it would appear that the trace file output does not log that an error occurred. Does anybody know a way of getting ORA- error codes and their associated SQL statements to appear in the trace file?
there's probably a better way but you could set the following in your init file event="1401 trace name error stacck forever" I think this will spit out a trace file in the udump each time the ora-01401 is encountered
If you look in the Metalink link you will see they suggest putting
EVENT="942 TRACE NAME ERRORSTACK LEVEL 3"
in the init.ora for a specific error (ORA-00942 in this example). (Steve was trying hard to remember this).
Can this be implemented by an ALTER SYSTEM? I haven't had a chance to test.
If I did the alter system that you, vipanshrm, suggest: I'd have 100's of Mb of trace to wade through - I only see the error about once per week. And because I don't know where it is coming from, I can't provoke it! . . . Steve's suggestion only generates trace output for the error and so can be left in place for a long period - spot on.