如果要对FORM的操作做TRACE操作,可以使用 帮助->诊断->跟踪 中启用跟踪功能来实现。
但是如果要实现对并发请求的trace,需要在 系统管理员->并发->方案->定义 里找到对应的并发请求,并勾选”启用跟踪”项。然后提交这个并发请求,系统就会生成并发请求的trace文件。一个复杂的并发请求,会生成一个很大的trace文件,所以在做完trace后,记得勾除并发请求的“启用跟踪”项。
用如下的SQL来实现查找并发请求的TRACE文件:
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 || '_ANONYMOUS.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_ID
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