oracle concurrent program session and sql

liangxichen發表於2011-06-10

SELECT req.request_id,
req.logfile_node_name node,
req.oracle_process_id,
req.enable_trace,
dest.VALUE || '/' || lower(dbnm.VALUE) || '_ora_' ||
oracle_process_id || '.trc' trace_filename,
prog.user_concurrent_program_name,
execname.execution_file_name,
execname.subroutine_name,
phase_code,
status_code,
ses.sid,
ses.serial#,
ses.module,
ses.machine
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 1 = 1
AND req.request_id = 21442588
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;

SELECT osuser,
username,
sql_text
FROM v$session a,
v$sqltext b
WHERE a.sql_address = b.address
AND a.sid=3112
ORDER BY address,
piece;

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/59792/viewspace-1051021/,如需轉載,請註明出處,否則將追究法律責任。

相關文章