Oracle: show parameters on error

Posted by llappall on Stack Overflow See other posts from Stack Overflow or by llappall
Published on 2012-09-21T17:14:25Z Indexed on 2012/10/02 21:37 UTC
Read the original article Hit count: 271

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about query