sqlplus scott/aaaaaa create table test_abc(id int); insert into test_abc select level from dual connect by level<=1000000; commit; exit
@H_502_5@sqlplus scott/aaaaaa alter session set tracefile_identifier='10046_lei_highgo'; alter session set timed_statistics = true; alter session set statistics_level=all; alter session set max_dump_file_size = unlimited; alter session set events '10046 trace name context forever,level 12'; select * from test_abc where rownum<100; Alter session set events '10046 trace name context off';
上述命令,生成的trace名字是ecton1_ora_20829_10046_lei_highgo.trc.
用tkprof命令来格式化该trc文件:
tkprof ecton1_ora_20829_10046_lei_highgo.trc 20829_10046_lei_highgo.output原文链接:https://www.f2er.com/oracle/211655.html