概述
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;
朋友提供,较为准确:
下面的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;
朋友提供,较为准确:
SELECT ses.sid,
ses.serial# ,
Ses.sql_id
FROM v$session ses,
v$process pro
WHERE ses.paddr = pro.addr
AND pro.spid IN (SELECT oracle_process_id
FROM fnd_concurrent_requests
WHERE request_id = <request_id>);
select sql_text from v$sqltext where sql_id='0kkhhb2w93cx0' order by piece
ses.serial# ,
Ses.sql_id
FROM v$session ses,
v$process pro
WHERE ses.paddr = pro.addr
AND pro.spid IN (SELECT oracle_process_id
FROM fnd_concurrent_requests
WHERE request_id = <request_id>);
select sql_text from v$sqltext where sql_id='0kkhhb2w93cx0' order by piece
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29135257/viewspace-1757347/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29135257/viewspace-1757347/
最后
以上就是细心自行车为你收集整理的EBS(ERP)根据请求号(request ID)查找正在运行的sql的全部内容,希望文章能够帮你解决EBS(ERP)根据请求号(request ID)查找正在运行的sql所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复