How to find the query parameters for a prepared statement in an oracle .trc file

debuggingoracleoracle-11g

I have an oracle query generating a 3137 error, and the trace file contains the query.
For example:

select x from y where z = :1

I think it would help to isolate the problem if I could determine the specific value of :1, however the 4.7M file doesn't seem to offer that information.

Is this information stored in the trc file?

This is oracle 11g running on redhat.

Best Answer

Not sure if the .trc file described here is made the same way yours was, but this might help you.

Essentially, somewhere in there, there should be a section of Binds which shows which values were bound to that :1 variable. The article doesn't do a good job of explaining how to tell which binds went to which queries since the example had only one query (and I can't figure it out from looking at it). Ignore the sort|uniq bit they used at the end to show that it was always the same query over and over, and you should get results like

Bind#0
  value=55

or whatever.