加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle 10046例子

发布时间:2020-12-12 15:41:20 所属栏目:百科 来源:网络整理
导读:sqlplus scott/aaaaaacreate table test_abc(id int);insert into test_abc select level from dual connect by level=1000000; commit;exit sqlplus scott/aaaaaaalter session set tracefile_identifier='10046_lei_highgo';alter session set timed_stati
sqlplus scott/aaaaaa
create table test_abc(id int);
insert into test_abc select level from dual connect by level<=1000000;  
commit;
exit



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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读