Monday, June 04, 2007

Concurrent request and its database SID

I had a long running Concurrent request and I needed to monitor it from the Enterprise manager but I needed its Database SID, so I search on metalink and I found this query which helped me out.

Connect as apps user

SQL> column process heading "FNDLIBR PID"
SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID
FROM apps.fnd_concurrent_requests a,
apps.fnd_concurrent_processes b,
v$process c,
v$session d
WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND b.session_id=d.audsid
AND a.request_id = &Request_ID
AND a.phase_code = 'R';


You need your concurrent request ID as an input.
c.SPID= is the operating system process id
d.sid= is the Oracle process id

I hope it will help you


Fadi

4 comments:

Anonymous said...

Handy piece of code.. do post one which will also show the OSPID along..though u can always get the OS PID once you have the DB PID woul be nice to have it all in one script.

Sam

fhasweh said...

thank you sam, i changed the same post i add the c.SPID which will give you the OS process id (spid)

fadi

Sam said...

Thanks for response.
Sam

fhasweh said...

thanks sam for the helpful comments

fadi