`
cczmf
  • 浏览: 17090 次
  • 性别: Icon_minigender_1
  • 来自: 广东
社区版块
存档分类
最新评论

EBS请求如何启用跟踪并获取问题sql

阅读更多
1.并发定义中,勾上“启用跟踪”复选框;

2.获取并发程序日志目录:SELECT * FROM v$parameter t WHERE t.NAME = 'user_dump_dest'

3.格式trace文件
cd /aftapp/oracle/diag/rdbms/aftdb/aFtDB2/trace
tkprof {input trace file} {output file} sys = no sort = prsela,exeela,fchela ;

例如:
tkprof tpfmsuat_ora_1229036_10_CAIFS_CR6876442.trc tpfmsuat_ora_1229036_10_CAIFS_CR6876442.txt sys = no sort = prsela,exeela,fchela ;

说明:tkprof命令执行的时候,按sort = prsela,exeela,fchela;这个排序,得到的格式化后的trace文件最上面就是耗时elapsed最大的了,这个一般就是要找的问题sql。

请求查询:
select c.user_name,
       b.user_concurrent_program_name,
       a.request_date,
       a.argument_text,
       (a.actual_completion_date - a.actual_start_date) * 24 * 60 minutes,
       a.actual_start_date,
       a.actual_completion_date,
       a.request_id,
       a.outfile_name
  from apps.fnd_concurrent_requests    a,
       apps.fnd_concurrent_programs_vl b,
       apps.fnd_user                   c,
       apps.per_all_people_f           papf
 where a.concurrent_program_id = b.concurrent_program_id
   and a.requested_by = c.user_id
   and c.user_name = papf.employee_number(+)
   and a.actual_completion_date is not null
   and b.user_concurrent_program_name = 'CUX:辅助科目余额表'
      /*and c.user_name = ' 你要找的用户的'*/
      /*and a.request_date <=
      to_date('2005-03-01 23:59:59', 'yyyy-mm-dd hh24:mi:ss')*/
   and a.request_date >=
       to_date('2020-12-20 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
 order by a.request_date desc
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics