如何取得Oracle并行执行的trace:

ALTER SESSION SET tracefile_identifier='10046_PROD';
ALTER SESSION SET max_dump_file_size = unlimited;
ALTER SESSION SET timed_statistics = true;
ALTER SESSION SET "_px_trace" = low , messaging;
ALTER SESSION SET statistics_level=all;
ALTER SESSION SET events '10046 trace name context forever, level 12';

执行SQL文

ALTER SESSION SET events '10046 trace name context off';