How to get full SQL statement with bind variables replaced from trace file?
When setting up
ALTER SESSION SET EVENTS '10046 trace name context forever, level 4';
ALTER SESSION SET sql_trace = true;
the resulting trace file contains an SQL query with bind variables and the resolution of the bind variables in a separate "BINDS" section. This is normal if there are a couple of binding variables. This is not very useful when I have another 100 bind variables.
Tkprof processes the trace file, but does not support bind variables.
Is it possible to get full SQL statements with replaceable bind variables so that I can easily copy-paste and re-execute it? Maybe a free tool that will process my trace file and output full SQL statements?
I would also evaluate the solution without SQL tracing, using v $ sql and friends instead.
source
share