How does one turn SQL Trace on for performance capture?
If you need to capture SQL statements to replay in another instance you can turn trace on and capture in the trace files located in the udump folder.
– turn timing on.
alter session set timed_statistics=true;
– set to unlimited otherwise you may get an incomplete trace file when dump file size limit is reached.
alter session set max_dump_file_size=unlimited;
alter session set events ’10046 trace name context forever, level 12′;
– ******* run all of your processing here *******
alter session set events ’10046 trace name context off’;