title: Oracle SQL trace with bind variables
body: <p>How to aquire the full SQL statement with bind variables substituted from a trace file?</p>
  
  <p>When setting</p>
  
  <pre><code>ALTER SESSION SET EVENTS '10046 trace name context forever, level 4';
  ALTER SESSION SET sql_trace = true;
  </code></pre>
  
  <p>the resulting trace file contains the SQL query with bind variables and the resolution of the bind variables in a separate "BINDS" section. This is fine if there are a couple of bind variables. It's not very useful when I have 100+ bind variables.</p>
  
  <p>Tkprof processes the trace file but does not support bind variables.</p>
  
  <p>Is it possible to get the full SQL statements with the bind variables substituted so I can easily copy-paste and re-execute it? Is there maybe a free tool that will process my trace file and output the full SQL statements?</p>
  
  <p>I'd also appreciate a solution without SQL tracing using v$sql and friends instead.</p>