Gutirez
R12 Studing

Oracle Report Trace

原文地址:report报表的trace方式作者:双心客

到并发定义中,勾上“启用跟踪”

[转载]report报表的trace方式

提交一个请求,得到请求编号

用下面的sql语句查找trace文件

select fcr.request_id "Request ID",
      p1.value "Trace Directory",
      '*' || fcr.oracle_process_id || '*.trc' "Trace File format",
      fcp.user_concurrent_program_name "Program"
 from fnd_concurrent_requests   fcr,
      v$parameter               p1,
      fnd_concurrent_programs_tl fcp
 where p1.name = 'user_dump_dest'
  and fcp.language = 'US'
  and fcr.concurrent_program_id = fcp.concurrent_program_id
  and fcr.program_application_id = fcp.application_id
  and fcr.request_id = &request_id

 

这个更详细:

select 'Request id: ' || request_id,
      'Trace id: ' || oracle_process_id,
      'Trace Flag: ' || req.enable_trace,
      'Trace Name: ' || dest.value || '/' || lower(dbnm.value) || '_ora_' ||
       oracle_process_id || '.trc',
      'Prog. Name: ' || prog.user_concurrent_program_name,
      'File Name: ' || execname.execution_file_name ||
      execname.subroutine_name,
      'Status : ' || decode(phase_code, 'R', 'Running') || '-' ||
      decode(status_code, 'R', 'Normal'),
      'SID Serial: ' || ses.sid || ',' || ses.serial#,
      'Module : ' || ses.module
 from fnd_concurrent_requests   req,
      v$session                 ses,
      v$process                 proc,
      v$parameter               dest,
      v$parameter               dbnm,
      fnd_concurrent_programs_vl prog,
      fnd_executables           execname
 where req.request_id = &request
  and req.oracle_process_id = proc.spid(+)
  and proc.addr = ses.paddr(+)
  and dest.name = 'user_dump_dest'
  and dbnm.name = 'db_name'
  and req.concurrent_program_id = prog.concurrent_program_id
  and req.program_application_id = prog.application_id
  and prog.application_id = execname.application_id
  and prog.executable_id = execname.executable_id;

posted on 2013-05-23 09:03  Gutirez  阅读(283)  评论(0编辑  收藏  举报