Home:ALL Converter>Oracle: show parameters on error

Oracle: show parameters on error

Ask Time:2012-09-22T01:14:25         Author:llappall

Json Formatter

When Oracle logs a parameterized SQL query failing, it shows "?" in place of the parameters, i.e. the query before replacing parameters. For example,

"SELECT * FROM table where col like '?'" 
SQL state [99999]; error code [29902]; 
ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: 
  Oracle Text error: DRG-50901: 
  text query parser syntax error on line 1, column 48

Is there a way to change logging so it shows the parameter values? The information above is absolutely useless unless I can see what the actual parsing problem was.

In general, is there a way to set logs in Oracle to show parameters in parameterized query errors?

Author:llappall,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/12535114/oracle-show-parameters-on-error
yy