DBA_Oracle Erp并发程序运行状态查询和监控(案例)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了DBA_Oracle Erp并发程序运行状态查询和监控(案例),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4769字,纯文字阅读大概需要7分钟。
内容图文
2014-08-09 Created By BaoXinjian
Looking on how to check long running concurrent request in Oracle Apps 11i or R12? Here’s the overview of the SQL query script to detect the session information of each program.First you need to get the listing of running concurrent request in Oracle Apps 11i or R12. You can use the SQL query script as below to obtain the list of running request.
- SELECT a.request_id
- ,a.oracle_process_id "SPID"
- ,frt.responsibility_name
- ,c.concurrent_program_name || ‘: ‘ || ctl.user_concurrent_program_name
- ,a.description
- ,a.ARGUMENT_TEXT
- ,b.node_name
- ,b.db_instance
- ,a.logfile_name
- ,a.logfile_node_name
- ,a.outfile_name
- ,q.concurrent_queue_name
- ,a.phase_code,a.status_code, a.completion_text
- , actual_start_date
- , actual_completion_date
- , fu.user_name
- ,(nvl(actual_completion_date,sysdate)-actual_start_date)*1440 mins
- ,(SELECT avg(nvl(a2.actual_completion_date-a2.actual_start_date,0))*1440 avg_run_time
- FROM APPLSYS.fnd_Concurrent_requests a2,
- APPLSYS.fnd_concurrent_programs c2
- WHERE c2.concurrent_program_id = c.concurrent_program_id
- AND a2.concurrent_program_id = c2.concurrent_program_id
- AND a2.program_application_id = c2.application_id
- AND a2.phase_code || ‘‘ = ‘C‘) avg_mins
- ,round((actual_completion_date - requested_start_date),2) * 24 duration_in_hours
- FROM APPLSYS.fnd_Concurrent_requests a,APPLSYS.fnd_concurrent_processes b
- ,applsys.fnd_concurrent_queues q
- ,APPLSYS.fnd_concurrent_programs c
- ,APPLSYS.fnd_concurrent_programs_tl ctl
- ,apps.fnd_user fu
- ,apps.FND_RESPONSIBILITY_TL frt
- WHERE a.controlling_manager = b.concurrent_process_id
- AND a.concurrent_program_id = c.concurrent_program_id
- AND a.program_application_id = c.application_id
- AND a.phase_code = ‘R‘
- AND a.status_code = ‘R‘
- AND b.queue_application_id = q.application_id
- AND b.concurrent_queue_id = q.concurrent_queue_id
- AND ctl.concurrent_program_id = c.concurrent_program_id
- AND a.requested_by = fu.user_id
- AND a.responsibility_id = frt.responsibility_id
- ORDER BY a.actual_start_date DESC
SELECT a.request_id ,a.oracle_process_id "SPID" ,frt.responsibility_name ,c.concurrent_program_name || ‘: ‘ || ctl.user_concurrent_program_name ,a.description ,a.ARGUMENT_TEXT ,b.node_name ,b.db_instance ,a.logfile_name ,a.logfile_node_name ,a.outfile_name ,q.concurrent_queue_name ,a.phase_code,a.status_code, a.completion_text , actual_start_date , actual_completion_date , fu.user_name ,(nvl(actual_completion_date,sysdate)-actual_start_date)*1440 mins ,(SELECT avg(nvl(a2.actual_completion_date-a2.actual_start_date,0))*1440 avg_run_time FROM APPLSYS.fnd_Concurrent_requests a2, APPLSYS.fnd_concurrent_programs c2 WHERE c2.concurrent_program_id = c.concurrent_program_id AND a2.concurrent_program_id = c2.concurrent_program_id AND a2.program_application_id = c2.application_id AND a2.phase_code || ‘‘ = ‘C‘) avg_mins ,round((actual_completion_date - requested_start_date),2) * 24 duration_in_hours FROM APPLSYS.fnd_Concurrent_requests a,APPLSYS.fnd_concurrent_processes b ,applsys.fnd_concurrent_queues q ,APPLSYS.fnd_concurrent_programs c ,APPLSYS.fnd_concurrent_programs_tl ctl ,apps.fnd_user fu ,apps.FND_RESPONSIBILITY_TL frt WHERE a.controlling_manager = b.concurrent_process_id AND a.concurrent_program_id = c.concurrent_program_id AND a.program_application_id = c.application_id AND a.phase_code = ‘R‘ AND a.status_code = ‘R‘ AND b.queue_application_id = q.application_id AND b.concurrent_queue_id = q.concurrent_queue_id AND ctl.concurrent_program_id = c.concurrent_program_id AND a.requested_by = fu.user_id AND a.responsibility_id = frt.responsibility_id ORDER BY a.actual_start_date DESC
You can see the request id and other relevant information from the result.
Based on the SPID associated to each running request, query the v$session or v$session_longops table to see what is the request id doing in the backend.
- SELECT b.sid, b.serial#, a.spid, b.program, b.osuser, b.machine,
- b.TYPE, b.event, b.action, b.p1text, b.p2text, b.p3text, b.state, c.sql_text,b.logon_time
- FROM v$process a, v$session b, v$sqltext c
- WHERE a.addr=b.paddr
- AND b.sql_hash_value = c.hash_value
- AND b.STATUS = ‘ACTIVE‘
- AND a.spid = ‘11696‘
- ORDER BY a.spid, c.piece
SELECT b.sid, b.serial#, a.spid, b.program, b.osuser, b.machine, b.TYPE, b.event, b.action, b.p1text, b.p2text, b.p3text, b.state, c.sql_text,b.logon_time FROM v$process a, v$session b, v$sqltext c WHERE a.addr=b.paddr AND b.sql_hash_value = c.hash_value AND b.STATUS = ‘ACTIVE‘ AND a.spid = ‘11696‘ ORDER BY a.spid, c.piece
Replace v$session with gv$session if the database is running on RAC environment. Enable or set trace if you wish to know more details on the session.
Thanks and Regards
原文:http://www.cnblogs.com/eastsea/p/4203366.html
内容总结
以上是互联网集市为您收集整理的DBA_Oracle Erp并发程序运行状态查询和监控(案例)全部内容,希望文章能够帮你解决DBA_Oracle Erp并发程序运行状态查询和监控(案例)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。