10046 SQL trace 的做法
一、获取当前sessionID。
select sid from v$mystat where rownum<2;
二、执行如下步骤
1. alter session set statistics_level=all;
2. alter session set tracefile_identifier='ORGPERF';
3. alter session set events '10046 trace name context forever, level 12';
4. Execute the problematic sql
5. exec dbms_session.reset_package;
6. exit
7. Provide all raw trace files generated in user_dump_dest with the string
'ORGPERF' as part of the trace file name.
三、tkprof 。