Oracle: show parameters on error
- by llappall
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?