ORACLE EBS的Request ID和後臺資料庫Session ID關聯

kunlunzhiying發表於2017-03-25
ORACLE EBS的Request和後臺資料庫Session透過apps.fnd_concurrent_requests.oracle_process_id欄位和v$process.spid欄位關聯。[@more@]

下面的SQL可以根據Request ID找到對應的Session資訊:-
select *
from v$session
where paddr in
(select addr
from v$process
where spid =
(select b.oracle_process_id
from apps.fnd_concurrent_requests b
where b.request_id = &req_number))

或者進一步找到正在執行的SQL:-
select sql_text
from v$sqltext_with_newlines
where hash_value in
(select SQL_HASH_VALUE
from v$session
where paddr in
(select addr
from v$process
where spid =
(select b.oracle_process_id
from apps.fnd_concurrent_requests b
where b.request_id = &req_number)))
order by piece;

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

相關文章